[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: os.exit() with EXIT_SUCCESS and _FAILURE
- From: Rob Kendrick <rjek@...>
- Date: Tue, 5 Oct 2010 12:58:00 +0100
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.