Hi Jason, As for signal handling, I have asked Gilles recently: https://github.com/poolpOrg/OpenSMTPD/issues/332 Seems it won't be changed in nearest future. As for exit codes in general, probably you may look at last commits by Sunil and Gilles and corresponding code around as well, there should be some relevant info.
--- wbr, Denis. On Wed, Oct 30, 2013 at 8:04 AM, Jason A. Donenfeld <[email protected]> wrote: > 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 >
