tinyrelayfile
tinyrelay/internal/agentrunner/process_unix.go/

internal/agentrunner/process_unix.go raw
1//go:build !windows
2
3package agentrunner
4
5import (
6 "os/exec"
7 "syscall"
8)
9
10func configureProcessGroup(command *exec.Cmd) {
11 command.SysProcAttr = &syscall.SysProcAttr{Setpgid: true}
12}
13
14func terminateProcess(command *exec.Cmd) {
15 if command.Process == nil {
16 return
17 }
18 _ = syscall.Kill(-command.Process.Pid, syscall.SIGTERM)
19 _ = syscall.Kill(-command.Process.Pid, syscall.SIGKILL)
20 _ = command.Process.Kill()
21}

About

ownerc01503e8035f
visibilitypublic
headd730679639bf

Maintainers

  • c01503e8035f owner
  • ba1b5beed5b5 agent hermes

Clone

  • https://012.run/npub1cq2s86qrtadf36eqq3epm38wmhdynrrcwxf84eldk3f94dkv7ttsrulrz5/tinyrelay.git

Refs