Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!samsung!uunet!mcsun!hp4nl!phigate!ehviea!leo From: leo@ehviea.ine.philips.nl (Leo de Wit) Newsgroups: comp.unix.wizards Subject: Re: Problems with processes Message-ID: <829@ehviea.ine.philips.nl> Date: 17 Jul 90 07:07:08 GMT References: <6530@helios.TAMU.EDU> <1990Jul13.133702.12546@virtech.uucp> Reply-To: leo@ehviea.UUCP (Leo de Wit) Organization: Philips I&E Eindhoven Lines: 24 In article <1990Jul13.133702.12546@virtech.uucp> cpcahil@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.