# HG changeset patch # User Matt Johnston # Date 1450188944 -28800 # Node ID 3daff2072bd0636953654a057251f898bd58de5f # Parent d058e15ea2139c921149dcbdc110dad2adb6d600 rename killchild to kill_proxy_sighandler diff -r d058e15ea213 -r 3daff2072bd0 cli-main.c --- a/cli-main.c Tue Dec 15 22:09:55 2015 +0800 +++ b/cli-main.c Tue Dec 15 22:15:44 2015 +0800 @@ -37,7 +37,7 @@ #ifdef ENABLE_CLI_PROXYCMD static void cli_proxy_cmd(int *sock_in, int *sock_out, pid_t *pid_out); -static void killchild(int signo); +static void kill_proxy_sighandler(int signo); #endif #if defined(DBMULTI_dbclient) || !defined(DROPBEAR_MULTI) @@ -78,9 +78,9 @@ if (cli_opts.proxycmd) { cli_proxy_cmd(&sock_in, &sock_out, &proxy_cmd_pid); m_free(cli_opts.proxycmd); - if (signal(SIGINT, killchild) == SIG_ERR || - signal(SIGTERM, killchild) == SIG_ERR || - signal(SIGHUP, killchild) == SIG_ERR) { + if (signal(SIGINT, kill_proxy_sighandler) == SIG_ERR || + signal(SIGTERM, kill_proxy_sighandler) == SIG_ERR || + signal(SIGHUP, kill_proxy_sighandler) == SIG_ERR) { dropbear_exit("signal() error"); } } else @@ -164,11 +164,8 @@ } } -static void killchild(int signo) { +static void kill_proxy_sighandler(int UNUSED(signo)) { kill_proxy_command(); - if (signo) { - _exit(1); - } - exit(1); + _exit(1); } #endif /* ENABLE_CLI_PROXYCMD */