[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: os.exit() with EXIT_SUCCESS and _FAILURE
- From: HyperHacker <hyperhacker@...>
- Date: Tue, 5 Oct 2010 07:48:17 -0600
On Tue, Oct 5, 2010 at 05:58, Rob Kendrick <rjek@rjek.com> wrote:
> On Tue, Oct 05, 2010 at 08:54:20AM -0300, Luiz Henrique de Figueiredo wrote:
>> > Would it be possible for some future version of Lua to expose the C
>> > stdlib.h constants EXIT_SUCCESS and EXIT_FAILURE in the os library, for
>> > use with os.exit()? The values of them are implementation-defined, and
>> > so they're useful.
>>
>> Personally, I'd use booleans for that:
>> os.exit(true) --> exit(EXIT_SUCCESS)
>> os.exit(false) --> exit(EXIT_FAILURE)
>> plus the current scheme:
>> os.exit() --> exit(EXIT_SUCCESS)
>> os.exit(n) --> exit(n)
>
> I like this. Too late for 5.2?
>
> B.
>
>
+1, though I wonder if there might be a reason to expose the values as
well? Maybe for checking return values from other processes?
--
Sent from my toaster.