delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/10/23/04:01:00

Date: Wed, 23 Oct 1996 09:48:02 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Juanjo Erauskin <juanjo AT jet DOT es>
Cc: djgpp AT delorie DOT com, DJ Delorie <dj AT delorie DOT com>
Subject: Re: Problem with popen()
In-Reply-To: <326BA2B9.652B@jet.es>
Message-Id: <Pine.SUN.3.91.961023094058.6813R-100000@is>
Mime-Version: 1.0

On Mon, 21 Oct 1996, Juanjo Erauskin wrote:

>     "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. "
> 
> 	DJGPP pclose() function doesn't return exit status. Return 0 if 
> pclose is OK or return -1 if pclose doesn't terminate good.

The question is: what does POSIX say about `pclose'?  DJ?

The diff you posted is incomplete, I think.  On MSDOS, when you call
`popen' to *read* from the pipe, the command is called by `popen', and
`pclose' just closes and deletes the temporary file used as the ``pipe''. 
So in that case, the exit status should be saved by `popen' to be returned
later by `pclose'. 

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019