View | Details | Raw Unified | Return to bug 1029 | Differences between
and this patch

Collapse All | Expand All

(-)openssh-4.0p1/serverloop.c (+10 lines)
Lines 151-156 Link Here
151
       errno = save_errno;
151
       errno = save_errno;
152
}
152
}
153
static void
154
sigterm_handler(int sig)
155
{
156
       session_destroy_all(NULL);
157
       exit(0);
158
}
159
153
/*
160
/*
154
 * Make packets from buffered stderr data, and buffer it for sending
161
 * Make packets from buffered stderr data, and buffer it for sending
155
 * to the client.
162
 * to the client.
Lines 501-506 Link Here
501
       /* Initialize the SIGCHLD kludge. */
508
       /* Initialize the SIGCHLD kludge. */
502
       child_terminated = 0;
509
       child_terminated = 0;
503
       mysignal(SIGCHLD, sigchld_handler);
510
       mysignal(SIGCHLD, sigchld_handler);
511
       mysignal(SIGTERM, sigterm_handler);
504
       /* Initialize our global variables. */
512
       /* Initialize our global variables. */
505
       fdin = fdin_arg;
513
       fdin = fdin_arg;
Lines 673-678 Link Here
673
       /* We no longer want our SIGCHLD handler to be called. */
681
       /* We no longer want our SIGCHLD handler to be called. */
674
       mysignal(SIGCHLD, SIG_DFL);
682
       mysignal(SIGCHLD, SIG_DFL);
683
       mysignal(SIGTERM, SIG_DFL);
675
       while ((wait_pid = waitpid(-1, &wait_status, 0)) < 0)
684
       while ((wait_pid = waitpid(-1, &wait_status, 0)) < 0)
676
               if (errno != EINTR)
685
               if (errno != EINTR)
Lines 745-750 Link Here
745
       debug("Entering interactive session for SSH2.");
754
       debug("Entering interactive session for SSH2.");
746
       mysignal(SIGCHLD, sigchld_handler);
755
       mysignal(SIGCHLD, sigchld_handler);
756
       mysignal(SIGTERM, sigterm_handler);
747
       child_terminated = 0;
757
       child_terminated = 0;
748
       connection_in = packet_get_connection_in();
758
       connection_in = packet_get_connection_in();
749
       connection_out = packet_get_connection_out();
759
       connection_out = packet_get_connection_out();

Return to bug 1029