Hello,
I want to "intercept" all possible signals in order to close all the
"states" of my application when a SIGKILL || SIGTERM || SEGFAULT ||
true arrives. I have some objects that flushes some data on their
destructor; all I want is to know how can I do this even if some other
application is killing me. I found *atexit()* but it doesn't work.
The code is pretty simple:
function()
{
for-each object in objects_list
delete object;
}
That function _must_ be executed if the program started (e.g. main()
was called). Is there any way I can do this ? How can I do this ?
Thanks,
--
Laurențiu Dascălu
--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to [email protected]
Please read the FAQ at http://kernelnewbies.org/FAQ