debug icon indicating copy to clipboard operation
debug copied to clipboard

Process waits for forked children when 'debug' is loaded

Open sudoremo opened this issue 1 year ago • 1 comments

Your environment

  • ruby -v: ruby 3.2.1 (2023-02-08 revision 31819e82c8) +YJIT [x86_64-darwin23]
  • rdbg -v: rdbg 1.9.2

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 avatar Aug 26 '24 09:08 sudoremo