popen() can't tell if cmd fails
Charles Hannum
hannum at vivaldi.psu.edu
Fri Jul 6 17:00:30 AEST 1990
Quoting (without permission) from the popen/pclose man page on this system:
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.
The reader can extrapolate the rest.
(I'm assuming you're using a real Unix popen() and pclose() ... ? If you're
using a cheap MS-LOSS half-ass-look-alike, then this probably won't work. In
fact, I'm almost positive it won't in that case.)
--
Virtually,
Charles Martin Hannum "Those who say a thing cannot be done should
Please send mail to: under no circumstances stand in the way of
hannum at schubert.psu.edu he who is doing it." - a misquote
More information about the Comp.lang.c
mailing list