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

make terminating process group optional #88

Open
craftyguy opened this issue May 9, 2022 · 1 comment
Open

make terminating process group optional #88

craftyguy opened this issue May 9, 2022 · 1 comment

Comments

@craftyguy
Copy link

I've got a use case where I don't necessarily want to terminate an entire process group (i.e. having children outlive the parent is desired).

If you're open to such a patch, I can look into implementing it. The default behavior should be the current behavior: SIGTERM the process group.

@daniel-nichter
Copy link
Member

Yeah if there's a clean way to make this optional, I'm open to a PR. We'll also have to see if it doesn't mess up Wait because currently the code says,

    // Signal the process group (-pid), not just the process, so that the process
    // and all its children are signaled. Else, child procs can keep running and
    // keep the stdout/stderr fd open and cause cmd.Wait to hang.
    return terminateProcess(c.status.PID)

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

No branches or pull requests

2 participants