Re: Feature request for 5.2; make exit codes from popen()ed programs obtainable
Patrick Donnelly <batrick <at> batbytes.com>
2009-09-02 01:16:35 GMT
On Tue, Sep 1, 2009 at 4:37 PM, Rob Kendrick<lua-l <at> nun.org.uk> wrote:
> Currently in Lua, it appears as if it is impossible to obtain the exit
> code of a program that you have opened with io.popen(); the close
> method on the returned object only returns true.
> Are there reasons for it not return this? If not, can I request it be
> considered for 5.2?
This has been discussed . There were some hacks proposed for
obtaining the status code in that thread. It would be nice if popen
returned the status code. I feel it should be a second argument,
however, because popen may fail early with "nil, <failure string>".
"Let all men know thee, but no man know thee thoroughly: Men freely
ford that see the shallows."
- Benjamin Franklin