lua-users home
lua-l archive

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


> 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"))
  print(f:read"*all")
  print(f:close())

and then kill the process "lua -i", f:close() (as corrected by the
proposed patch) still reports a normal termination through its
second return.

-- Roberto