#can someone check me on how SIGINT works

1 messages · Page 1 of 1 (latest)

astral valve
#

iirc when you Ctrl+C in your shell it actually sends it to the entire progress group. So if you run e.g. a | b | c, they'll all receive it, and I guess that includes child processes, but not 100% sure. You can probably shield a child process by giving it a new progress group (SysProcAttr{Setpgid: true})

glass bramble
#

hehe i was not actually familiar with process groups and this behavior!

#

thanks, that's helpful

#

i wonder, would we want something like this behavior for the session in general? should the SDKs detach them?
since we have the stdin trick to close them, the session should manage to close itself even if the client is badly behaved and doesn't shut it down nicely

astral valve