fix for ssh stuck nodes
This commit is contained in:
parent
686aee7226
commit
49fdd9695d
@ -775,7 +775,7 @@ void runbbs_real(int socket, char *ip, int ssh) {
|
||||
st.sa_handler = sigterm_handler2;
|
||||
sigemptyset(&st.sa_mask);
|
||||
st.sa_flags = SA_SIGINFO;
|
||||
if (sigaction(SIGTERM, &st, NULL) == -1) {
|
||||
if (sigaction((ssh ? SIGHUP : SIGTERM), &st, NULL) == -1) {
|
||||
dolog("Failed to setup sigterm handler.");
|
||||
exit(1);
|
||||
}
|
||||
|
@ -684,8 +684,6 @@ static void ssh_chan_close(ssh_session session, ssh_channel channel, void *userd
|
||||
int status;
|
||||
(void)session;
|
||||
(void)channel;
|
||||
kill(bbs_pid, SIGTERM);
|
||||
waitpid(bbs_pid, &status, 0);
|
||||
close(fd);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user