lua-users home
lua-l archive

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

> This exists since Lua 5.2. The culprit is the exit code on Windows having a different format than on unix/posix. The latter has 0-255 as common ground and mostly anything else is undefined. But on Windows the exit code is a 32bit signed integer.
> Now this code:
> Treats -1 as a special case, and goes looking for an error message here:
> This results in “No error” in the windows case of -1, since it is a valid exit code.

(Sorry for such a late reply...)

I don't understand the problem here. The documentation for 'system' in
Windows says this:

  A return value of -1 indicates an error, and errno is set to one of the
  following values: [...]

-- Roberto