Harden Harness runtime, persistence and execution for Hand
This commit is contained in:
1 parent
09c30fe2d5
commit
0972eed3ea
164 files changed
+15912
-506
No files matched your search
@@ -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
|
||||
}
|
||||
Reference in new issue
Block a user