Writing a program that cannot be killed except by reboot

Tom Kelly tom at sco.COM
Thu Apr 18 04:13:15 AEST 1991


In <1991Apr15.113041.3069 at ghost.unimi.it> marco at ghost.unimi.it (Marco Negri) writes:

> mcgough at wrdis01.af.mil (Jeffrey B. McGough) writes:
> 
> >Is there anyway to block ALL signals to a program so that it
> >may not be killed by kill???
> 
> >I know the manual says that sig 9 may not be caught or blocked
> >but I was wondering if there might be a funny (strange, interesting)
> >hack to get around this...
> 
> 	I know one and only one situation in that a process can't be killed
> 	with SIGKILL signal.
> 	When it is slept, in kernel mode, with priority < PZERO.

There is another way, although it is not very useful.  If a process
is ptraced, a SIGKILL delivered to it will cause it to stop and
awaken its parent.  The parent can continue the process without
delivering the signal, which can cause the process to appear unkillable.
Of course, the parent can be killed.

Tom Kelly  (416) 922-1937
SCO Canada, Inc. (formerly HCR) 130 Bloor St. W., Toronto, Ontario, Canada
{utzoo, utcsri, uunet}!scocan!tom or tom at sco.com



More information about the Comp.unix.programmer mailing list