Xref: utzoo comp.unix.questions:6796 comp.unix.wizards:8158 comp.unix.microport:565 Path: utzoo!mnetor!uunet!husc6!bloom-beacon!gatech!udel!princeton!mccc!pjh From: pjh@mccc.UUCP (Pete Holsberg) Newsgroups: comp.unix.questions,comp.unix.wizards,comp.unix.microport Subject: Re: Trouble killing processes in SysV/AT Message-ID: <608@mccc.UUCP> Date: 30 Apr 88 15:05:30 GMT References: <3950@killer.UUCP> <3951@killer.UUCP> <468@micropen> Reply-To: pjh@mccc.UUCP (Pete Holsberg) Organization: The College On The Other Side of Route 1 Lines: 31 In article <468@micropen> dave@micropen (David F. Carlson) writes: ...In article <3951@killer.UUCP>, wnp@killer.UUCP (Wolf Paul) writes: ...> Can anyone enlighten me as to what causes a process to become "immortal" ...> in System VR2, or Microport UNIX System V/AT, to be more specific? ...> ...This "prblem" is not a Micrport issue at all: it is UNIX all the way. ... ...> I have encountered this a number of times, where it would be impossible ...> even for root to kill a process; if the parent process of the "immortal" ...> process is killed, the child attaches itself to init, PID 1. ...> What causes a process to refuse to die? I thought signal 9 (kill) could ...> not be intercepted or ignored? ... ...If you are technically minded and want a real answer read: ... "The Design of the UNIX Operating System" by Maurice Bach. ... ...The quick answer is that any process that is in the kernel with a WCHAN ...will not go back to user mode until that channel is awoken. Who will ...awaken it? Two choices: a device driver interrupt or a kernel timer ...interrupt. In all likelihood your ill-behaved process is waiting in ...a poorly written device driver close(). No close should allow a process ...to wait forever on a event that may not come. Signals (kill -9) are ...delivered when a process in kernel mode re-enters user mode. However, ...you process is waiting in kernel mode and won't get those signals til ...its done: NEVER! (or until the long sought interrupt allows it's WCHAN ...to go again. This happens frequently on my 3B2/400 when it gets into a deadly embrace with my modem: I cannot kill -9 any of the processes associated with that port! It takes toggling the modem's ON/OFF switch to break the embrace. Surely there must be a better way! ??