Actions
Bug #8616
closedProcess.daemon messes up threads
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.1.0dev (2013-07-10 trunk 41870) [x86_64-darwin12.4.0]
Backport:
Description
=begin
Hi,
When I daemonize a process, it somehow messes up threads from the parent process. Here is a script to reproduce the problem:
r1, w1 = IO.pipe
r2, w2 = IO.pipe
t = Thread.new {
puts "start"
w1.write "x"
IO.select([r2])
puts "alive"
}
IO.select([r1])
Process.daemon true, true # comment this line out and everything works
puts Process.pid
w2.write "x"
t.join
puts "done"
If you run this program, there will be a ruby process in the background that never dies. If you comment out the "Process.daemon" line, the script finishes.
=end
Actions
Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0