mirror of
https://github.com/hanzoai/deploy.git
synced 2026-10-07 08:44:50 +00:00
* fix: send sigterm to cmp commands before sigkill to allow for potential cleanup Signed-off-by: Ashin Sabu <[email protected]> * fix: unit test for runCommand in cmpserver to test cleanup modified Signed-off-by: Ashin Sabu <[email protected]> * fix: change unit test for plugin/runCommand to avoid bad trap along with lint fix Signed-off-by: Ashin Sabu <[email protected]> --------- Signed-off-by: Ashin Sabu <[email protected]>
21 lines
345 B
Go
21 lines
345 B
Go
//go:build !windows
|
|
// +build !windows
|
|
|
|
package plugin
|
|
|
|
import (
|
|
"syscall"
|
|
)
|
|
|
|
func newSysProcAttr(setpgid bool) *syscall.SysProcAttr {
|
|
return &syscall.SysProcAttr{Setpgid: setpgid}
|
|
}
|
|
|
|
func sysCallKill(pid int) error {
|
|
return syscall.Kill(pid, syscall.SIGKILL)
|
|
}
|
|
|
|
func sysCallTerm(pid int) error {
|
|
return syscall.Kill(pid, syscall.SIGTERM)
|
|
}
|