lua-users home
lua-l archive

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

On 01/19/2011 06:22 AM, Luiz Henrique de Figueiredo wrote:
>> This is really two changes, one which fixes the just-plain-wrong behavior of
>> the return-value of file:close() when called on a pipe on Linux (and
>> presumably also other posix platforms)
> Thanks for your patch but Lua targets ANSI C platforms not POSIX.
> We prefer to avoid #ifdefs in the main code.

I'm not sure what ANSI C describes for the return-value of pclose(), but
your own manual says that the return-value of file:close() will be the exit
status of the child process; your own code returns something other than
that.  That's the definition of a bug.