Xref: utzoo comp.unix.questions:7011 comp.unix.wizards:8472 comp.unix.microport:637 Path: utzoo!attcan!uunet!husc6!think!ames!amdahl!sri-unix!quintus!ok From: ok@quintus.UUCP (Richard A. O'Keefe) Newsgroups: comp.unix.questions,comp.unix.wizards,comp.unix.microport Subject: Re: Trouble killing processes in SysV/AT Message-ID: <971@cresswell.quintus.UUCP> Date: 14 May 88 08:39:05 GMT References: <81@dcs.UUCP> <97@lakart.UUCP> Organization: Quintus Computer Systems, Mountain View, CA Lines: 12 In article <97@lakart.UUCP>, dg@lakart.UUCP (David Goodenough) writes: > P.S. In response to all those that replied to my questions Re: > processes, I discover the solution is simple. After every fclose(fp), where > fp is the FILE * I got from popen, I do a wait(&j), and the zombies go away. > Just like sprinkling holy water on them :-). Thanks to all who replied. Surely there is some mistake here? FILE*s returned by popen() are ONLY supposed to be closed by pclose(). To quote the manual: A stream opened by popen should be closed by pclose, which waits for the associated process to terminate and returns the exit status of the command. NEVER close popen()ed files with fclose()!