Hi, community!

I know that I can achieve child processes termination upon parent death
using process groups and the way to do this for POSIX with Golang
(cmd.SysProcAttr = &syscall.SysProcAttr{Setpgid: true}, etc.)

I also know that boost uses this approach for Posix and job objects for
Windows.

I tried to do the homework and realized that Golang's standard library
already exposes the Windows' APIs for job management (however it seems like
they aren't being used "internally")

I'd love to have this integrated "out of the box" with the os/exec stuff
(my exact use case is to launch a process with a context and have it
killed, with all its possible children also killed, on context expiration).
I'd also love to work on that if there is community interest in this
feature but I know that it could be a long way to walk through. So... I
have to resolve my issue in the short term and was wondering... Does
somebody know a 3rd party library currently dealing with this? I couldn't
find anything more than an outdated lib that exposes the job APIs (
https://pkg.go.dev/github.com/kolesnikovae/go-winjob/jobapi)

Thank you so much for taking the time to read and for any insight!

Best!

Pablo Caballero

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAPxFe-vi5g99tz8h%3DQsTQ0cYbuUoF8HjK7oarc%3DPpEhyhQvt_w%40mail.gmail.com.

Reply via email to