mirror of https://github.com/status-im/consul.git
20 lines
368 B
Go
20 lines
368 B
Go
// +build windows
|
|
|
|
package command
|
|
|
|
import (
|
|
"os"
|
|
"syscall"
|
|
)
|
|
|
|
// signalPid sends a sig signal to the process with process id pid.
|
|
// Interrupts et al is not implemented on Windows. Always send a SIGKILL.
|
|
func signalPid(pid int, sig syscall.Signal) error {
|
|
p, err := os.FindProcess(pid)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
_ = sig
|
|
return p.Signal(syscall.SIGKILL)
|
|
}
|