ruby / debug

Debugging functionality for Ruby
BSD 2-Clause "Simplified" License
1.14k stars 127 forks source link

Process waits for forked children when 'debug' is loaded #1113

Open sudoremo opened 3 months ago

sudoremo commented 3 months ago

Your environment

Describe the bug

When forking a ruby process without detaching it, the parent process should not wait for the child process to exit. Requiring debug however makes the process wait until the child process quits.

To Reproduce

require 'debug'

fork { sleep 10 }

Expected behavior

The parent process should exit immediately after forking. Effective behaviour is that the parent process waits for the child process to exit, which takes roughly 10s in the example above. Without the Gem debug, it works as expected.

Additional context

May be related to #1099.

sudoremo commented 1 month ago

May I bump this issue? This is quite a concern for us at the moment. We've tried looking into it ourselves, but so far I had no luck in identifying the problem. Many thanks for your help.