[Bug:1.9] PTY.check is broken

[email protected]$G$9!#e(B


  • r20298e$B$K$h$k$He(B PTY.check(pid) to poll program termination.
  • e$B%a%=%C%IK\BN$J$N$Ke(Bint statuse$B$rJV$7$F$$$ke(B
  • pid_te$B$r4|BT$9$ke(Braise_from_check()e$B$Ke(BVALUEe$B$rEO$7$F$$$ke(B

Index: ext/pty/pty.c

— ext/pty/pty.c (revision 26395)
+++ ext/pty/pty.c (working copy)
@@ -606,9 +606,9 @@ pty_check(int argc, VALUE *argv, VALUE s

 rb_scan_args(argc, argv, "11", &pid, &exc);
  • cpid = rb_waitpid(NUM2PIDT(pid), &status, WUNTRACED);
  • cpid = rb_waitpid(NUM2PIDT(pid), &status, WNOHANG|WUNTRACED);
    if (cpid == -1) return Qnil;
  • if (!RTEST(exc)) return status;
  • raise_from_check(pid, status);
  • if (!RTEST(exc)) return rb_last_status_get();
  • raise_from_check(cpid, status);
    return Qnil; /* not reached */

e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B

In message “Re: [ruby-dev:40141] [Bug:1.9] PTY.check is broken”
on Mon, 25 Jan 2010 17:07:53 +0900, Nobuyoshi N.
[email protected] writes:

|* r20298e$B$K$h$k$He(B PTY.check(pid) to poll program termination. e$B$He(B
| e$B$$$&$3$H$J$N$K=N;$^$GBT$AB3$1$ke(B
e$B%a%=%C%IK\BN$J$N$Ke(Bint statuse$B$rJV$7$F$$$ke(B
|* pid_te$B$r4|BT$9$ke(Braise_from_check()e$B$Ke(BVALUEe$B$rEO$7$F$$$ke(B

e$B%3%_%C%H$7$F$/[email protected]$5$$!#e(B

e$B%A%1%C%He(B #2642 e$B$,99?7$5$l$^$7$?!#e(B (by Nobuyoshi N.)

e$B%9%F!<%?%9e(B Opene$B$+$ie(BClosede$B$KJQ99e(B
e$B?JD=e(B % 0e$B$+$ie(B100e$B$KJQ99e(B

This issue was solved with changeset r26402.
Nobuyoshi, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs