[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Feature request for 5.2; make exit codes from popen()ed programs obtainable
- From: Patrick Donnelly <batrick@...>
- Date: Tue, 1 Sep 2009 21:16:35 -0400
On Tue, Sep 1, 2009 at 4:37 PM, Rob Kendrick<lua-l@nun.org.uk> wrote:
> Hi,
>
> 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 [1]. 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>".
--
-Patrick Donnelly
"Let all men know thee, but no man know thee thoroughly: Men freely
ford that see the shallows."
- Benjamin Franklin