pty e$B$G%O%s%0$9$k$3$H$,$"$j$^$9!#e(B
% ./ruby -rpty -e ‘p $$; r,w,pid = PTY.spawn(“echo a”); p pid; p r.gets’
19510
19512
e$B$3$3$G%O%s%0e(B
e$BB>$NC<Kv$+$ie(B ps e$B$G$_$k$H!";R%W%m%;%9$,e(B echo
e$B$K$J$C$F$^$;$s!#e(B
e$B$D$^$j!"e(Bexec e$B0JA0$G%O%s%0$7$F$$$k$h$&$G$9!#e(B
% ps auxww|egrep ‘19510|19512’
akr 19510 0.0 0.3 7548 2904 pts/21 Sl+ 14:47 0:00 ./ruby
-rpty -e p $$; r,w,pid = PTY.spawn(“echo a”); p pid; p r.gets
akr 19512 0.0 0.1 7732 1680 pts/27 Ss+ 14:47 0:00 ./ruby
-rpty -e p $$; r,w,pid = PTY.spawn(“echo a”); p pid; p r.gets
akr 19733 0.0 0.0 4256 816 pts/20 S+ 14:51 0:00 grep -E
19510|19512
e$B$J$*!"%O%s%0$7$J$$$3$H$b$"$j$^$9!#$$$^e(B
16e$B2s$d$C$F$_$?$H$3$m!"e(B
8e$B2s%O%s%0$7$^$7$?!#$=$l$/$i$$$GLdBj$,5/$-$^$9!#e(B
% ./ruby -v
ruby 1.9.1 (2008-12-05 patchlevel 5000 revision 20528) [i686-linux]
In article [email protected],
Yukihiro M. [email protected] writes:
e$B$H8F$S=P$5$l$Fe(B native_cond_signal e$B$,%O%s%0$7$F$^$9!#$C$F!"$3e(B
e$B$l$,$J$<%O%s%0$9$k$N$+;d$K$O$o$+$i$J$$$s$G$9$,!#e(B
e$B;W$&$K!"e(Bfork e$B$7$?;R%W%m%;%9$G!"e(Bexec
e$B$9$kM=Dj$J$i!"e(Bthread e$B2se(B
e$B$j$K$O$$$C$5$$<j$r?($l$J$$$N$,$$$$$s$8$c$J$$$G$9$+$M$'!#e(B
e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B
In message “Re: [ruby-dev:37418] [Bug:1.9] pty hang”
on Sat, 13 Dec 2008 14:49:56 +0900, Tanaka A. [email protected]
writes:
|
|pty e$B$G%O%s%0$9$k$3$H$,$“$j$^$9!#e(B
|
|% ./ruby -rpty -e ‘p $$; r,w,pid = PTY.spawn(“echo a”); p pid; p r.gets’
|19510
|19512
|e$B$3$3$G%O%s%0e(B
|
|e$BB>$NC<Kv$+$ie(B ps e$B$G$_$k$H!”;R%W%m%;%9$,e(B echo e$B$K$J$C$F$^$;$s!#e(B
|e$B$D$^$j!"e(Bexec e$B0JA0$G%O%s%0$7$F$$$k$h$&$G$9!#e(B
e$B%5%V%W%m%;%9$Ge(B
proc_exec_v
before_exec
rb_thread_stop_timer_thread
native_stop_timer_thread
e$B$H8F$S=P$5$l$Fe(B native_cond_signal e$B$,%O%s%0$7$F$^$9!#$C$F!"$3e(B
e$B$l$,$J$<%O%s%0$9$k$N$+;d$K$O$o$+$i$J$$$s$G$9$,!#e(B