Hello, James!

On Tue, 16 Jun 1998, James wrote:

>is it possible to have a function called when the user presses ^C or kills
>the program so that the program can 'clean up' before being terminated? (i.e
>close all open files, write out data, free allocated memory etc). if so, how?

You should install you signal handler, in your case for SIGINT.

man signal # should help.

Bye.
--
Try to value useful qualities in one who loves you.

--
    With best of best regards, Pawel S. Veselov (aka Black Angel)
                   Internet e-mail : [EMAIL PROTECTED]
    Web page : http://www.druid.ml.org/~vps/ | ICQ UIN : 5252265

Reply via email to