diff --git a/src/esvm/service.go b/src/esvm/service.go index bfbe3b8..ead98fd 100644 --- a/src/esvm/service.go +++ b/src/esvm/service.go @@ -353,7 +353,9 @@ func (service *EnitService) StopService() error { newServiceStatus := EnitServiceCrashed defer func() { // Kill remaining child processes - syscall.Kill(-pid, syscall.SIGKILL) + if pid != 0 { + syscall.Kill(-pid, syscall.SIGKILL) + } service.state = newServiceStatus service.processID = 0