Problems with <defunct> processes

Leo de Wit leo at ehviea.ine.philips.nl
Tue Jul 17 17:07:08 AEST 1990


In article <1990Jul13.133702.12546 at virtech.uucp> cpcahil at virtech.UUCP (Conor P. Cahill) writes:
|
|To fix your problem you need to find out why rsh is leaving the 
|defunct processes lying around (i.e why it isn't waiting on the 
|processes or why it doesn't just die & go away so init can wait on
|them).

A good point to look at is whether the command started by rsh had its
standard channels (stdin, stdout, stderr) closed; if it doesn't, that
is exactly the reason the defunct process is still laying around. So

    close(0);
    close(1);
    close(2);

(and appropriate open's) in the command started by rsh, or

    exec >&-
    exec 2>&-
    exec <&-

if the command is a shell script.

    Leo.



More information about the Comp.unix.wizards mailing list