mirror of
https://github.com/argoproj/argo-cd.git
synced 2026-03-29 21:08:49 +02:00
* fix: send sigterm to cmp commands before sigkill to allow for potential cleanup Signed-off-by: Ashin Sabu <ashin.sabu@harness.io> * fix: unit test for runCommand in cmpserver to test cleanup modified Signed-off-by: Ashin Sabu <ashin.sabu@harness.io> * fix: change unit test for plugin/runCommand to avoid bad trap along with lint fix Signed-off-by: Ashin Sabu <ashin.sabu@harness.io> --------- Signed-off-by: Ashin Sabu <ashin.sabu@harness.io>
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)
|
|
}
|