Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!att!tut.cis.ohio-state.edu!ucbvax!UCBVAX.BERKELEY.EDU!"Dan Karron From: Dan Karron@UCBVAX.BERKELEY.EDU Newsgroups: comp.sys.sgi Subject: exit signal Message-ID: <9012160645.AA10200@karron.med.nyu.edu> Date: 16 Dec 90 06:45:28 GMT Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: karron@cmcl2.nyu.edu Organization: The Internet Lines: 23 How can I set a signal handler for a software exit() call ? I am looking to catch programs that exit via an exit(value) call, or fall off the end of the main procedure. I do not have control of the user code. I want to save the window state of the application program. I have a macro to edit "exit(value)" to "Exit(value)", but that does not catch mains falling off the end, or exit() with no args. I tried SIGTERM, but that does not do what I want. What does it do ? Cheers! dan. +-----------------------------------------------------------------------------+ | karron@nyu.edu (E-mail alias that will always find me) | | Fax: 212 340 7190 * Dan Karron, Research Associate | | . . . . . . . . . . . . . . * New York University Medical Center | | 560 First Avenue \*\ Pager <1> (212) 397 9330 | | New York, New York 10016 \**\ <2> 10896 <3> | | (212) 340 5210 \***\_________________________________________ | | Main machine: karron.med.nyu.edu (128.122.135.3) IRIS 85GT | +-----------------------------------------------------------------------------+