Hi all,

Sorry if this question has previously been answered. I'm wondering about
exit codes. Does OpenSMTPD have different exit codes for:

- when it receives SIGTERM
- when it receives SIGKILL
- when one of the processes dies and then the main process as a result
needs to exit
- when smtpctl stop runs

The reason I'm wondering is I've just come across this in the systemd man
page:

SuccessExitStatus=
> Takes a list of exit status definitions that when returned by the main
> service process will be considered successful termination, in addition to
> the normal successful exit code 0 and the signals SIGHUP, SIGINT, SIGTERM
> and SIGPIPE. Exit status definitions can either be numeric exit codes or
> termination signal names, separated by spaces. Example:
> "SuccessExitStatus=1 2 8 SIGKILL", ensures that exit codes 1, 2, 8 and the
> termination signal SIGKILL are considered clean service terminations. This
> option may appear more than once in which case the list of successful exit
> statuses is merged. If the empty string is assigned to this option, the
> list is reset, all prior assignments of this option will have no effect.



This is interesting to me because it would enable a simple restarter for
opensmtpd. But I'd like to be able to distinguish between the various ways
opensmtpd has of exiting.

Thanks,
Jason

Reply via email to