Signal Handling program
Need help with this program. Need to create a generic signal handler. Pgrogram hass to count the number of signals generated in a specific time period. The time interval, in milliseconds, is to be entered from the command line. In addition to catching CTRL-C from the keyboard, I have to define and count two additional user defined signals created from either the same or a child process. In addition to the time interval on the command line, input the number of processes to be created ( >0 ) in a chain structure. Each child process must generate each signal a random number of times.
After time elapsed, print out:
1. the number and type of all signals detected by each parent process ( 10 points )
2. the process-id, parent process-id and creation time of all processes created ( 10 points )
3. the user, real, and system time for each process created. (10 points ).
I don't know how to access the system for the timing and run the loop within that time. If anyone can help me with some section coding or an example or some links. Thanks
What have you done so far? Such as research into signals, signal handling and actual code attempts.
I've looked into signals and understand all the concepts. I know of the signals Cntrl-C, Cntrl-Z, kill command, and kill() within other processes, and i think pg. I know how it works, but really dont' know what to do when it gets to the implementation. Don't know where to start and finish. So basically....I have nothing.
Take a look at this for more information on the actual implementation. But you want to be careful when working with signals, it's very easy to screw up.
Thanks Prelude...I hope it helps