Tutorial Exercises Week 10

  1. Write a program in C/C++ that will read lines from standard input. Each line should be treated as the name of a program to execute. A new asymchronous process should be created to execute each program. Errors in executing each program should be reported.
  2. Spend the rest of the tutorial entering and testing the program, to make sure you understand it. Test it on X Window programs such as xclock and xterm as well as non-X programs.
  3. Add a signal handler for SIGCHLD which will report when a child process terminates.
  4. Add the wait system call (see man -s 2 wait ) to the signal handler to report on child exit status
email: jan@newmarch.name
Web: http://jan.newmarch.name/
Last modified: 10 April 2001