Mail Archives: djgpp/1996/10/23/04:01:00
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 -