ZDDC/zddc/internal/convert/sysprocattr_linux.go
2026-06-11 13:32:31 -05:00

20 lines
590 B
Go

//go:build linux
package convert
import "syscall"
// sysProcAttr returns the platform-specific SysProcAttr for the
// container-engine child.
//
// - Setpgid: put the child in its own process group so a kill
// targeted at -pid kills grandchildren too (podman/docker spawn
// helper processes for chromium).
// - Pdeathsig: SIGKILL the child if the zddc-server parent exits.
// This is a Linux-only feature (other platforms get only Setpgid).
func sysProcAttr() *syscall.SysProcAttr {
return &syscall.SysProcAttr{
Setpgid: true,
Pdeathsig: syscall.SIGKILL,
}
}