mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-17 07:30:41 +09:00
Sending ^C via the terminal on Linux may cause SIGINT to be sent twice to the factorio process, causing it to exit without completing the saving. This happens because the shell sends the interupt to all members of the process group for the job and this includes both the node client process and the factorio server process. Avoid this situation by passing detached to spawn when the platform is Linux, which causes the process to be created with its own process group and therefore not targeted by a SIGINT from the shell. This unfortunately does not work on Windows as we can't send SIGINT or ^C to a process there. Doing subprocces.kill on Windows terminates the process similarly to how SIGKILL works on Linux.
476 B
476 B