Skip to content

Commit d57903c

Browse files
committed
fix: os process find and kill properly
1 parent da2d636 commit d57903c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

internal/web/web.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,7 @@ func (web *Web) MustClose() {
227227
utils.Sleep(0.5)
228228
// remove process just in case
229229
// os.Process is cross platform safe way to remove a process
230-
osprocess := os.Process{Pid: web.launcher.PID()}
231-
_ = osprocess.Kill()
230+
if osprocess, err := os.FindProcess(web.launcher.PID()); err != nil {
231+
osprocess.Kill()
232+
}
232233
}

0 commit comments

Comments
 (0)