fix: add platform-specific sysproc for Windows and macOS

This commit is contained in:
jegly 2026-03-27 14:05:18 +11:00
commit 7f145b350e
3 changed files with 19 additions and 5 deletions

View file

@ -1,5 +1,3 @@
//go:build !windows
package main
import (
@ -7,9 +5,6 @@ import (
"syscall"
)
// setCommandSysProcAttr sets platform-specific process attributes.
// On Linux: sets a new process group so child processes don't receive
// terminal signals meant for the parent, and enables proper cleanup.
func setCommandSysProcAttr(cmd *exec.Cmd) {
cmd.SysProcAttr = &syscall.SysProcAttr{
Setpgid: true,