Systems Programming Homework 4

Systems Programming Homework 4


  1. Write a program that takes as an argument an integer and then creates that many child processes. All the children sleep for 5 seconds, then exit. The parent process sets a signal handler for SIGCHLD then enters a loop printing a message once every second. The handler calls wait and prints out the process ID of the child that has exited and increments a counter. When the counter reaches the number of children originally spawned, the program exits.
    Test the program for various numbers of children. The program is likely to miss some children as the number grows larger. Explain why it misses some signals and if there is a solution.

Place the program, a Makefile and any other information on running it and the answer to th question asked in a directory hw4 for which the permissions only permit the user (you) to access it.

This assignment is an individual assignment, to be done on your own without help from other students in the class.

Instructions for submitting the homework using svn are contained in this file.

Due : Thursday March 17, 2016
Extended : Thursday March 31, 2016


Paul A. Farrell