From: Laurent Sansonetti Date: 2003-05-16T17:35:53+09:00 Subject: Re: PTY: still problems (+patch) Hi Nobu, nobu.nokada@softhome.net wrote: > The modification itself seems good. But aren't there extra > spaces at the beginning of unchanged lines? > It is probably a problem with the 'cut and paste' operation in the previous mail. You can download the patch here: http://lrz.is-a-geek.org/pty.patch BTW, returning the status value in ChildExited is good. But it would be more convenient to return the exit status value as well. Actual code: begin ... rescue PTY::ChildExit => e exit_status = e.status >> 8 end I think it would be more user-friendly to add an accessor method in pty.c (``exit_status'' for example), which returns WEXITSTATUS(status). Or a method in the Process module, like module Process def Process.exit_status(status) status >> 8 end end begin ... rescue PTY::ChildExit => e exit_status = Process.exit_status(e.status) end The second option is better (I think), since it will be possible to call Process.exit_status with Process.wait2()[1] (or Process.waitpid2(XXX)[1]. -- Laurent