Page 1 of 1

Factorio headless server returns 1 for a successful exit

Posted: Tue Oct 03, 2023 7:18 pm
by sadris
Pressing Ctrl-C or sending SIGINT to the factorio headless server returns a 1 instead of 0 for a successful exit.

This makes systemd think that the process failed when this is not the case. My current unit file is below:

Code: Select all

[Unit]
Description=Factorio Headless Server

[Service]
Type=simple
WorkingDirectory=/opt/factorio
ExecStart=/opt/factorio/bin/x64/factorio --start-server main.zip --server-settings data/server-settings.json
KillSignal=SIGINT

Re: Factorio headless server returns 1 for a successful exit

Posted: Wed Oct 04, 2023 3:44 am
by sadris
It looks like this can be worked around by setting SuccessExitStatus=1, but it is a bit atypical for a Linux daemon to return 1 on a successful exit.

Re: Factorio headless server returns 1 for a successful exit

Posted: Sat Oct 07, 2023 5:35 pm
by Rseding91
Thanks for the report. It's now fixed for the next 1.1 release.