Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Byebug does not work when called in a background process group #830

Open
Mangara opened this issue Feb 11, 2022 · 0 comments · May be fixed by #831
Open

Byebug does not work when called in a background process group #830

Mangara opened this issue Feb 11, 2022 · 0 comments · May be fixed by #831

Comments

@Mangara
Copy link

Mangara commented Feb 11, 2022

Problem description

When running the following program:

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.)

Steps to reproduce the problem

Run the program above.

@Mangara Mangara linked a pull request Feb 13, 2022 that will close this issue
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant