why is this happening on windows
This commit is contained in:
parent
5949397c3f
commit
33d63a564e
2 changed files with 6 additions and 0 deletions
|
|
@ -10,6 +10,9 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func KillProcess(process *os.Process) error {
|
func KillProcess(process *os.Process) error {
|
||||||
|
if process == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
return syscall.Kill(-process.Pid, syscall.SIGKILL)
|
return syscall.Kill(-process.Pid, syscall.SIGKILL)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,9 @@ import (
|
||||||
import "golang.org/x/sys/windows"
|
import "golang.org/x/sys/windows"
|
||||||
|
|
||||||
func KillProcess(process *os.Process) error {
|
func KillProcess(process *os.Process) error {
|
||||||
|
if process == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
return process.Kill()
|
return process.Kill()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue