lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> 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)