require "byebug"
pid = fork do
Process.setpgrp
byebug
end
Process.waitpid(pid)
Byebug stops the execution of the forked process and presents the source code, but it doesn't present a prompt, and while I can type anything, byebug doesn't react.
If I remove the Process.setpgrp line, everything works as expected. Similarly, if I switch the foreground process group with a C binding to tcsetpgrp, everything works as expected.
Expected behavior
I expected the (byebug) prompt to appear and to respond to input.
Actual behavior
The (byebug) prompt does not appear and byebug does not respond to input. (It hangs on readline.)
Problem description
When running the following program:
Byebug stops the execution of the forked process and presents the source code, but it doesn't present a prompt, and while I can type anything, byebug doesn't react.
If I remove the
Process.setpgrp
line, everything works as expected. Similarly, if I switch the foreground process group with a C binding totcsetpgrp
, everything works as expected.Expected behavior
I expected the
(byebug)
prompt to appear and to respond to input.Actual behavior
The
(byebug)
prompt does not appear and byebug does not respond to input. (It hangs onreadline
.)Steps to reproduce the problem
Run the program above.