Xref: utzoo comp.unix.questions:6772 comp.unix.wizards:8137 comp.unix.microport:558 Path: utzoo!mnetor!uunet!husc6!bloom-beacon!mit-eddie!bbn!rochester!ur-tut!ur-valhalla!micropen!dave From: dave@micropen (David F. Carlson) Newsgroups: comp.unix.questions,comp.unix.wizards,comp.unix.microport Subject: Re: Trouble killing processes in SysV/AT Message-ID: <468@micropen> Date: 29 Apr 88 18:42:01 GMT References: <3950@killer.UUCP> <3951@killer.UUCP> Organization: Micropen Dirent Writing Systems, Pittsford, NY Lines: 34 Summary: Not Microport problem 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. -- David F. Carlson, Micropen, Inc. ...!{ames|harvard|rutgers|topaz|...}!rochester!ur-valhalla!micropen!dave "The faster I go, the behinder I get." --Lewis Carroll