www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1998/10/13/12:04:26

Date: Tue, 13 Oct 1998 19:03:55 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: djgpp-workers AT delorie DOT com
cc: Robert Hoehne <robert DOT hoehne AT gmx DOT net>
Subject: Re: Bug in popen
In-Reply-To: <199810131446.KAA04596@indy.delorie.com>
Message-ID: <Pine.SUN.3.91.981013190039.4278r-100000@is>
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com

On Tue, 13 Oct 1998, DJ Delorie wrote:

> pclose returns the exit code of the program it runs.

So the present version of pclose in the latest alpha (and the one in 
patched libc) is okay.

Robert, it seems that CVS has a bug in that it relies on zero being 
returned, even if diff3 ecits with non-zero status, since this is 
contrary to Posix.

> POSIX assumes
> you can always run the shell (which is what popen is supposed to use);
> problems getting the shell started are supposed to be returned by
> popen.

We do both, actually: if popen cannot run the program, it returns NULL 
(after the last patch I sent in) *and* pclose will return -1 (if called, 
since many programs won't bother to call it after getting NULL from popen).

- Raw text -


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