Tutorial Exercises Week 10
- 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.
- 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.
- Add a signal handler for SIGCHLD which will report when a child
process terminates.
- 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