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

Ignore SIGINT while running child process #58

Merged
merged 2 commits into from
Oct 19, 2022
Merged

Conversation

CGamesPlay
Copy link
Contributor

This resolves #55. My notes on the implementation:

  1. I had to do it in the Task section because the signal mask is inherited by the child processes, so ignoring SIGINT there actually causes the children to ignore it too. I don't see anything in the exec package that would allow not inheriting the signal mask, so we start the process, then mask the signal while we wait for the process to finish. It may be possible for the task to start and ignore SIGINT, and then for an external process to SIGINT the process group, both before our call to signal.Ignore, which would mean that the bug still exists. This feels extremely unlikely.
  2. I only handled SIGINT. I don't think any other signals are typically delivered to an entire process group, so I think this is OK.

Copy link
Collaborator

@yields yields left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💥

@yields yields merged commit 946c7a8 into tj:master Oct 19, 2022
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 this pull request may close these issues.

Robo abandons children
2 participants