cheusov / dictd

Client/server software, human language dictionary databases, and tools supporting the DICT protocol (RFC 2229)
71 stars 10 forks source link

Please exit with zero status upon receiving SIGTERM #22

Open bjornfor opened 3 months ago

bjornfor commented 3 months ago

Services run under systemd receive SIGTERM when it's time to stop the service. dictd doesn't seem to handle SIGTERM and exits with status 143 (128 + 15 SIGTERM). Since the exit code is non-zero, systemd marks the service as failed. I'd like dictd to exit with zero status in this case, to not falsely report errors to the service manager.

Workaround: tell systemd/dictd.service that the SIGTERM exit code is success: SuccessExitStatus=143.