Harden Harness runtime, persistence and execution for Hand

This commit is contained in:
sausheong committed 2026-09-09 22:55:55 +08:00
1 parent 09c30fe2d5
commit 0972eed3ea
164 files changed
+15912 -506

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
//go:build !unix
package process
import (
"errors"
"os"
"os/exec"
)
func configureGroup(cmd *exec.Cmd) {}
// Other platforms stop the direct child only. Process-tree guarantees apply
// to the advertised Linux/macOS backends; isolation is a separate capability.
func KillGroup(cmd *exec.Cmd) error {
if cmd.Process == nil {
return nil
}
err := cmd.Process.Kill()
if errors.Is(err, os.ErrProcessDone) {
return nil
}
return err
}