www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1998/10/13/10:46:34

Date: Tue, 13 Oct 1998 10:46:28 -0400 (EDT)
Message-Id: <199810131446.KAA04596@indy.delorie.com>
From: DJ Delorie <dj AT delorie DOT com>
To: djgpp-workers AT delorie DOT com
In-reply-to: <Pine.SUN.3.91.981013174224.4278C-100000@is> (message from Eli
Zaretskii on Tue, 13 Oct 1998 17:42:48 +0300 (IDT))
Subject: Re: Bug in popen
Reply-To: djgpp-workers AT delorie DOT com

> > Anywhere in the docs and also in popen.c it is documented,
> > that pclose returns zero for success and nonzero for failure.
> > But effectively pclose return in the case of success the return
> > value of the piped program.
> 
> DJ, what exactly does Posix say about this?  IIRC, the last changes in
> pclose were done to make it more Posix-compliant.

pclose returns the exit code of the program it runs.  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.

- Raw text -


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