On Sep 3, 2009, at 11:22 AM, Laurentziu Dascalu <dascalu.laurentziu@xxxxxxxxx > wrote:
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 ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ
Is this what you are looking for? http://linux.die.net/man/2/signal -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ