*BSD News Article 14381


Return to BSD News archive

Xref: sserve comp.unix.ultrix:17377 comp.unix.programmer:8935 comp.unix.bsd:11806
Newsgroups: comp.unix.ultrix,comp.unix.programmer,comp.unix.bsd
Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!agate!howland.reston.ans.net!zaphod.mps.ohio-state.edu!news.acns.nwu.edu!nucsrl!tellab5!laidbak!mday
From: mday@lachman.com (Matt Day)
Subject: Re: Peculiar behavior of pclose() -- mistery solved (long)
Message-ID: <1993Apr11.182514.27800@i88.isc.com>
Sender: usenet@i88.isc.com (Usenet News)
Nntp-Posting-Host: peppy.i88.isc.com
Organization: Lachman Technology, Inc., Naperville, IL
References: <PRZEMEK.93Mar28212112@rrdstrad.nist.gov> <1993Apr11.044800.6582@midway.uchicago.edu>
Date: Sun, 11 Apr 1993 18:25:14 GMT
Lines: 9

In article <1993Apr11.044800.6582@midway.uchicago.edu> besp@midway.uchicago.edu writes:
>[...]
>
>But! There is yet another mistery to solve: how come the original program
>works under SunOS ?

The reason is, on SunOS 4.x and SVR3/SVR4 systems, child processes
created by popen() close any popen()'ed pipes they may have inherited
from their parent.  The BSD popen() doesn't do this.