Skip to content

Commit

Permalink
Server exit status 0 on SIGTERM/SIGINT
Browse files Browse the repository at this point in the history
The previous exit status 1 would cause supervisor programs such as
systemd to report failure status on a "systemctl stop dropbear". Given
it's a graceful cleanup a status of 0 is appropriate. There doesn't seem
to be any other convention for "exited in response to SIGTERM".
  • Loading branch information
mkj committed Oct 3, 2024
1 parent bdc5b57 commit 2d142c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/svr-main.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ static void main_noinetd(int argc, char ** argv, const char* multipath) {

if (ses.exitflag) {
unlink(svr_opts.pidfile);
dropbear_exit("Terminated by signal");
dropbear_close("Terminated by signal");
}

if (val == 0) {
Expand Down

0 comments on commit 2d142c8

Please sign in to comment.