[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: PATCH: file:close() return-value for pipes
- From: Sam Roberts <vieuxtech@...>
- Date: Mon, 14 Feb 2011 14:55:24 -0800
On Mon, Feb 14, 2011 at 10:42 AM, Roberto Ierusalimschy
>> Wouldn't be better if the first result was what happened
>> ("exit" x "signal") and the second result the actual exit code
>> or signal number?
I don't think so...
> Better yet, it could return true for exit(0) and nil,what,code otherwise.
but this idea I like much better. It allows easy distinction between 0
-> success and 1 -> failure for
calling grep, for example, since 0 is true and 1 is false (nil,exit,1).