[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: PATCH: file:close() return-value for pipes
- From: Roberto Ierusalimschy <roberto@...>
- Date: Thu, 10 Feb 2011 16:24:44 -0200
> Are you talking about this value?
> The pclose() function waits for the associated process to
> terminate and returns the exit
> status of the command as returned by wait4(2).
> - man popen(3)
I am talking about signals, as reported by the macro WIFSIGNALED. Even
when the process ran by the shell is interrupted by a signal, the shell
itself is not. For instance, if I run the following:
f = assert(io.popen("lua -i"))
and then kill the process "lua -i", f:close() (as corrected by the
proposed patch) still reports a normal termination through its