Files
MagicMirror/tests/unit
Kristjan ESPERANTO 03e4eef3d1 fix(updatenotification): don't spawn a child process when running under PM2 (#4166)
Previously, `nodeRestart()` would spawn a detached child and exit. Under
PM2 that's a problem: PM2 also respawns on exit, so both race to bind
the same port.

The fix: When `process.env.pm_id` is set, just exit and let PM2 handle
the restart.

The spawn logic is moved into its own method so it can be tested
cleanly.

Partially fixes #4165
2026-05-21 22:25:47 +02:00
..