diff --git a/src/containers/server/loadRunningInstance.ts b/src/containers/server/loadRunningInstance.ts index 9c95faa7..ba9be2e7 100644 --- a/src/containers/server/loadRunningInstance.ts +++ b/src/containers/server/loadRunningInstance.ts @@ -11,8 +11,10 @@ export async function loadRunningInstance() { const json = JSON.parse(content); if (json.pid > 0) { try { - // sending the signal 0 to a given PID just checks if any process with the given PID is running, and you have the permission to send a signal to it. - process.kill(json.pid, 0); + // kill -0 seems not to work on alpine for some reason + if (!fs.existsSync('/proc/' + json.pid)) { + return null; + } } catch (err) { return null; }