Signal problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux