Proper exit handling

Doug Gwyn gwyn at smoke.BRL.MIL
Tue Mar 28 00:23:04 AEST 1989


In article <18832 at adm.BRL.MIL> Kemp at DOCKMASTER.NCSC.MIL writes:
>   Does anyone know of a bulletproof method of installing an exit
>handling routine that is guaranteed to be called when a process
>terminates?

Try running the "real" process as the child of another "monitor"
process.  The monitor would, of course, save the initial terminal
state, fork/exec the child, wait for the child to terminate, then
reset the terminal state and finally report the child exit status.



More information about the Comp.unix.questions mailing list