2015-01-24 15:09:24 +00:00
|
|
|
// +build windows
|
|
|
|
|
|
|
|
package command
|
|
|
|
|
|
|
|
import (
|
|
|
|
"os"
|
|
|
|
"syscall"
|
|
|
|
)
|
|
|
|
|
|
|
|
// signalPid sends a sig signal to the process with process id pid.
|
2015-01-25 10:42:26 +00:00
|
|
|
// Since interrupts et al is not implemented on Windows, signalPid
|
|
|
|
// always sends a SIGKILL signal irrespective of the sig value.
|
2015-01-24 15:09:24 +00:00
|
|
|
func signalPid(pid int, sig syscall.Signal) error {
|
|
|
|
p, err := os.FindProcess(pid)
|
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
_ = sig
|
|
|
|
return p.Signal(syscall.SIGKILL)
|
|
|
|
}
|