Created attachment 63309 [details]
When using a leading '-' in ExecStart, if a daemon-reload is performed while the command in question is still running, and it then exits with an abnormal status, the unit will enter the failed state, just as if the '-' had not been present.
This is easily reproduced by a trivial service unit and an equally trivial shell script, which I will attach as a test case.
I'm running systemd 185 on Arch Linux.
Detailed steps to reproduce:
1. Download the attachment and unpack it under /. This will put a shell script in /tmp/tf and a unit in /etc/systemd/system/tf.service .
2. Start tf.service. Check its status after 10 seconds have gone by. Observe that it exited with code 1, and systemd correctly ignored this exit-code.
2. Start tf.service again. Do a daemon-reload within the next 10 seconds (before /tmp/tf exits). Again check its status after 10 seconds have gone by. Observe that it again exited with code 1, but this time, systemd didn't ignore the exit-code, and the job incorrectly entered the failed state.
This problem is still evident with systemd 188.
This has long been fixed with the smarter logic of matching ExecXYZ= lines during daemon reloads. Let#s close.