Files
pmg/internal/audit/spawn_unix.go
T
Abhisek DattaandGitHub 9b0e12f130 feat: Add Support for Optimistic Cloud Sync (#273)
* feat: Add support for background sync

* refactor: Maintain single source of truth for command defn

* fix: Code review fixes

* fix: Code review fixes

* docs: Add corner case inline doc
2026-05-20 13:56:50 +05:30

17 lines
460 B
Go

//go:build !windows
package audit
import (
"os/exec"
"syscall"
)
// applyDetachAttrs configures cmd so that the child process is fully
// detached from the parent's controlling terminal and process group. Setsid
// makes the child its own session leader, so the parent can exit immediately
// without the child receiving SIGHUP/SIGINT from the parent's shell.
func applyDetachAttrs(cmd *exec.Cmd) {
cmd.SysProcAttr = &syscall.SysProcAttr{Setsid: true}
}