Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

vole
Site
Clone

Read only, no credentials:

https://rodent.software/vole.git

Write over SSH with a registered key:

git clone ssh://git@rodent.software/vole.git

Self-hosted forge that lives in your Git repo.

Blame · ci/agent/proctree_other.go

Line attribution on main · 20 line(s)

215f8aeb
Keenan Nemetz
2d ago
1 //go:build !unix && !windows
2
3 package agent
4
5 import "os/exec"
6
7 // newProcessGroup does nothing where there is no process group to put a command
8 // in, and killProcessGroup kills the process the runner started. The two exist
9 // together so a caller does not have to know which platform it is on.
10 func newProcessGroup(cmd *exec.Cmd) {}
11
12 // killProcessGroup ends the command. Children it started may outlive it here:
13 // without a job object or a process group the runner cannot reach them, and that
14 // is a gap in the bound this package promises, not a hidden fallback.
15 func killProcessGroup(cmd *exec.Cmd) error {
16 if cmd.Process == nil {
17 return nil
18 }
19 return cmd.Process.Kill()
20 }