[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: os.exit() with EXIT_SUCCESS and _FAILURE
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Tue, 5 Oct 2010 08:54:20 -0300
> 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)