Newsgroups: comp.unix.programmer Path: utzoo!censor!comspec!scocan!tom From: tom@sco.COM (Tom Kelly) Subject: Re: Writing a program that cannot be killed except by reboot Organization: SCO Canada, Inc. Distribution: na Date: Wed, 17 Apr 1991 18:13:15 GMT Message-ID: <1991Apr17.181315.14184@sco.COM> References: <444@wrdis01.af.mil> <1991Apr15.113041.3069@ghost.unimi.it> Sender: news@sco.COM (News administration) In <1991Apr15.113041.3069@ghost.unimi.it> marco@ghost.unimi.it (Marco Negri) writes: > mcgough@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@sco.com