From 81421b0cc4e239532a67937d146d0bf231005dfe Mon Sep 17 00:00:00 2001 From: EnumDev Date: Mon, 17 Nov 2025 10:03:45 +0200 Subject: [PATCH] Prevent killing process if pid is 0 --- src/esvm/service.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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