<defunct> processes (was Re: Trouble killing processes in SysV/AT)

David Goodenough dg at lakart.UUCP
Sat Apr 30 00:08:19 AEST 1988


>From article <3951 at killer.UUCP>, by wnp at killer.UUCP (Wolf Paul):
] 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?
] 
] 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.
] 
] The only way to get rid of such an immortal process seems to be to reboot,
] which is rather drastic.
] 
] What causes a process to refuse to die? I thought signal 9 (kill) could
] not be intercepted or ignored?
] 
] Any comments welcome.
] 
] Wolf Paul

I have noticed a similar phenomenon with BSD4 - I wrote a program once that
did lots and lots of popen("command", "w") calls. I fired it up background,
and a minute later did a "ps ag" to see what was happening. My process was
there, but so were about 40 processes marked STAT == Z, COMMAND == <defunct>.
Trying to kill -9 these failed, and I had gone superuser. I got lucky in
comparison to Mr. Paul - at least these went away when the parent exited.
However as Mr. Paul stated 'Is it not the case that kill -9 will terminate
a process - no if's, and's or but's'. As an interesting aside, I was running
TT == 0 (/dev/tty0), but the controlling TT of these defunct processes was
drifting all over hell's half acre: TT == co, then TT == h1, then TT == dx -
all for the same process!
--
	dg at lakart.UUCP - David Goodenough		+---+
							| +-+-+
	....... !harvard!adelie!cfisun!lakart!dg	+-+-+ |
						  	  +---+



More information about the Comp.unix.wizards mailing list