Any way to catch exit()?
Lawrence V. Cipriani
lvc at cbnews.ATT.COM
Sat Aug 27 04:56:31 AEST 1988
One solution that I have employed is to define my own exit routine.
When the program terminates my exit routine is called, and does what
I want.
void exit(e)
int e;
{
...whatever...
_exit(e); /* still need this sucker */
}
This probably is non-portable but should solve your problem (if I
understood it correctly).
If you have the source code to popen(3) look at it for another example.
--
Larry Cipriani, AT&T Network Systems, Columbus OH, cbnews!lvc lvc at cbnews.ATT.COM
More information about the Comp.lang.c
mailing list