cmd icon indicating copy to clipboard operation
cmd copied to clipboard

make terminating process group optional

Open craftyguy opened this issue 3 years ago • 1 comments

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.

craftyguy avatar May 09 '22 21:05 craftyguy

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)

daniel-nichter avatar Mar 03 '23 01:03 daniel-nichter