PRISM 1-2-3
Updated 41 days ago
The sigaction function is the advanced version of signal handling. In particular, we want to know which process (by PID) generated the signal. We will eventually need to know which of more than one possible process we are interacting with...
Our parent program potentially has an array of command line arguments. The array is argv and the integer argc has a count of how many elements are in the array...
In the parent function we have a wait(NULL). This is blocking. This prevents the parent program from completing before the child program does (which would turn the child into a zombie process).