I've just encountered the following fault in make test-all.
[ 8077/13116] TestProcess#test_setsid = 0.06 s
2) Error:
test_setsid(TestProcess):
Errno::ESRCH: No such process
/Users/nagachika/opt/ruby-trunk/src/ruby/test/ruby/test_process.rb:1592:in getsid' /Users/nagachika/opt/ruby-trunk/src/ruby/test/ruby/test_process.rb:1592:in block in test_setsid'
/Users/nagachika/opt/ruby-trunk/src/ruby/test/ruby/test_process.rb:1581:in popen' /Users/nagachika/opt/ruby-trunk/src/ruby/test/ruby/test_process.rb:1581:in test_setsid'
I think child process could terminate before calling Process.getsid for its pid.
how about the following patch? Process.kill in in ensure-clause guarantee the child process will be terminated.
This issue was solved with changeset r39245.
Tomoyuki, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
test/ruby/test_process.rb (test_setsid): Added a workaround for
MacOS X. Patch by nagachika. [Bug #7826] [ruby-core:52126]
Thanks nagachika-san.
I realized MacOS X's getsid() wrongly return ESRCH when target process is zombie. I fully agree your patch is good workaround and I committed it.
This issue was solved with changeset r39513.
Tomoyuki, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
merge revision(s) 39179,39245: [Backport #7826]
the process maybe already finished
* test/ruby/test_process.rb (test_setsid): Added a workaround for
MacOS X. Patch by nagachika. [Bug #7826] [ruby-core:52126]