Mail Archives: djgpp/1996/10/23/01:29:29
From: | Juanjo Erauskin <juanjo AT jet DOT es>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Problem with popen()
|
Date: | Mon, 21 Oct 1996 15:20:09 +0000
|
Organization: | Servicio IBERNET (Telefonica Transmision de Datos)
|
Lines: | 61
|
Message-ID: | <326BA2B9.652B@jet.es>
|
NNTP-Posting-Host: | info539.jet.es
|
Mime-Version: | 1.0
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Hello:
I am using SCO UNIX to compile my C programs and I use DJGPP for MSDOS
porting.
I have a problem with pclose() function. The SCO man pages explain
this:
...
"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.
I change pclose() function to run like SCO UNIX. Is posible to change
this in DJGPP.
Thanks. Juanjo Erauskin
PD: Here diff of my popen() function against DJGPP popen() function:
196c196
< if ((retval = system (l1->command)) == EOF)
---
> if (system (l1->command) == EOF)
- Raw text -