obtaining process exit code from popen()
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: obtaining process exit code from popen()
- From: "John D. Blair" <jdb@...>
- Date: 2009年6月05日 17:20:17 -0700
Has anybody worked out how to obtain the exit code from a sub-process
invoked using popen()?
It looks to me that the exit code is currently discarded b/c the
standard __close meta-method only returns a boolean.
Would it be possible to define an alternate close method (i.e.,
pclose()) which one could use to close a stream opened using popen() and
obtain the exit code from the sub-process? Has this already been done?
thanks much,
John.