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

Spawn children in their own process groups, and deliver SIGINT to each group #177

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

benweint
Copy link

This change fixes the issue described in #176 by:

  1. Making nf spawn each child process in its own distinct process group via the detached option
  2. Delivering SIGINT signals to children to the entire process group, rather than just the direct child
  3. Ensuring that nf can handle the delivery of multiple consecutive SIGINT signals to itself without exiting prematurely

Changes 1 & 2 are inspired by the approach taken by goreman (a similar tool implemented in Go). Change 3 is somewhat unrelated, but was added in order to deal with the problem described in pnpm/pnpm#7374 (sometimes, a parent process of nf might itself forward a SIGINT to nf, and the terminal might also deliver that signal).

@pboling
Copy link

pboling commented Feb 22, 2024

@benweint Would you be willing to push up a your fork to npm, appropriately renamed? This is an important project!

StrongLoop is totally dead, and their most popular tech (Loopback) appears to live on (after being acquired?) as a distinct organization. I don't think there is any hope of this repo getting any more attention... :(

@pboling
Copy link

pboling commented Feb 22, 2024

Perhaps foreman-ode... it works on multiple levels.

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.

2 participants