That is, you're sending the SIGTERM via systemd?

Is it possible that systemd is sending it to the whole process group, and 
not just to the parent?  Is systemd running the go command directly, or via 
a shell?

If you want to be 100% sure, you can start the children in separate process 
groups.  For Linux it's something like this (not tried for a while):

        p.theCommand.SysProcAttr = &syscall.SysProcAttr{Setsid: true}
        err := p.theCommand.Start()

(BTW, I note you weren't checking the error return from Start, which I do 
recommend)

But I'd also check the systemd documentation.  Also try sending a kill 
-TERM <pid> directly to the parent, just to compare.

-- 
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/b866f2a3-e9f8-47b4-bfa5-26c17ba30c60n%40googlegroups.com.

Reply via email to