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.

Code

527 commit(s) on main

Put job execution behind an interface Keenan Nemetz · 2h ago de3eec16
history blame raw 682 B
1//go:build !unix && !windows
2
3package agent
4
5import "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.
10func 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.
15func killProcessGroup(cmd *exec.Cmd) error {
16 if cmd.Process == nil {
17 return nil
18 }
19 return cmd.Process.Kill()
20}
21