On Tue, 30 Oct 2012 11:43:19 -0500
David Ashley <w.david.ash...@gmail.com> wrote:

> There is no way to intercept a TERM signal. In Linux the signal is
> never transmitted to the process. Linux just kills it with prejudice.
> 
> David Ashley
> 

No, this is not true. You cannot intercept a kill -s SIGKILL. SIGKILL
is signal 9. 

However, you easily can intercept a SIGTERM. Try this small C snippet,
and a kill <pid> won't do any harm to the process.


#include <stdio.h>
#include <stdlib.h>

#include <signal.h>
#include <unistd.h>

int main() {
  signal(SIGTERM, SIG_IGN); // SIG_IGN = ignore the signal

  sleep(120);
  exit(0); 
}



-- 
Manfred

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to