Question: PA02.pdf - Mozilla Firefox DDI Upload Assignment: PAO 2 PA02.pdf Chegg study | Guided Sol + https://learn.unm.edu/bbcswebdav/pid-4077984-dt-content-rid-2 1 of 1 Automatic Zoom # Programming Assignment

 PA02.pdf - Mozilla Firefox DDI Upload Assignment: PAO 2 PA02.pdf Chegg

PA02.pdf - Mozilla Firefox DDI Upload Assignment: PAO 2 PA02.pdf Chegg study | Guided Sol + https://learn.unm.edu/bbcswebdav/pid-4077984-dt-content-rid-2 1 of 1 Automatic Zoom # Programming Assignment #02 Due: Tuesday, 09/25/2018, by 11:30pm Write a program that will utilize signal handlers to intercept keyboard interrupts to manage control of a child process. Your main program should fork and exec a new child process to run the "yes" command (use man yes to learn more). You should then register signal handlers for both ctrl-c and ctrl-z in your main program. The ctrl-z signal handler should toggle the child yes stop the child process if it is running, or resume the child process if it is stopped, all while keeping the main program running. The ctrl-c signal should kill the child process, and then exit the main process. In both signal handlers, add print statements indicating what the program is doing-ie. ctrl-z caught, stopping child process. Your main program should sit in an infinite loop once the setup has been completed. It should only exit when the user hits ctrl- c, after cleaning up the child process. Name your source code as "PA02sig XXYY.c", then submit into PA02. (X will be your first name initial (2-char) and Y will be your last name initial (2-char), such as, "PA02sig-XISU for Xiang Sun"). We will compile and test your program from there PA02.pdf - Mozilla Firefox DDI Upload Assignment: PAO 2 PA02.pdf Chegg study | Guided Sol + https://learn.unm.edu/bbcswebdav/pid-4077984-dt-content-rid-2 1 of 1 Automatic Zoom # Programming Assignment #02 Due: Tuesday, 09/25/2018, by 11:30pm Write a program that will utilize signal handlers to intercept keyboard interrupts to manage control of a child process. Your main program should fork and exec a new child process to run the "yes" command (use man yes to learn more). You should then register signal handlers for both ctrl-c and ctrl-z in your main program. The ctrl-z signal handler should toggle the child yes stop the child process if it is running, or resume the child process if it is stopped, all while keeping the main program running. The ctrl-c signal should kill the child process, and then exit the main process. In both signal handlers, add print statements indicating what the program is doing-ie. ctrl-z caught, stopping child process. Your main program should sit in an infinite loop once the setup has been completed. It should only exit when the user hits ctrl- c, after cleaning up the child process. Name your source code as "PA02sig XXYY.c", then submit into PA02. (X will be your first name initial (2-char) and Y will be your last name initial (2-char), such as, "PA02sig-XISU for Xiang Sun"). We will compile and test your program from there

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!