containerd / go-runc

runc bindings for Go
Apache License 2.0
161 stars 71 forks source link

Add option for runc to unshare process group #19

Closed tonistiigi closed 7 years ago

tonistiigi commented 7 years ago

Running runc in same process group has some surprising side-effects when library functions are being used, for example when signals are being sent to the process group by a shell. I made it opt-in atm but could set it to default as well.

Signed-off-by: Tonis Tiigi tonistiigi@gmail.com

dqminh commented 7 years ago

LGTM

crosbymichael commented 7 years ago

Do you want to make this the default with a way to unset it as the option?

tonistiigi commented 7 years ago

@crosbymichael So change it to NoSetpgid?

crosbymichael commented 7 years ago

@tonistiigi if you think its safer to have this as a default

tonistiigi commented 7 years ago

@crosbymichael I guess the user already needs to know to set the PdeathSignal properly for cleanup so maybe makes more sense to keep it like this. If the default is to set new process group but no death signal then in some cases it may leak more often. Also, there are benefits of using the same keys as os/exec.

crosbymichael commented 7 years ago

ok, sgtm

LGTM