Bugzilla – Attachment 895 Details for
Bug 1029
SIGTERM and cleanup of wtmp files
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
SIGTERM handler for user sshd process
SIGTERM.patch (text/plain), 1.29 KB, created by
senthilkumar
on 2005-05-04 02:23:26 AEST
(
hide
)
Description:
SIGTERM handler for user sshd process
Filename:
MIME Type:
Creator:
senthilkumar
Created:
2005-05-04 02:23:26 AEST
Size:
1.29 KB
patch
obsolete
>diff -Nur openssh-4.0p1/serverloop.c openssh-4.0p1-sigterm/serverloop.c >--- openssh-4.0p1/serverloop.c 2004-08-13 16:48:01.000000000 +0530 >+++ openssh-4.0p1-sigterm/serverloop.c 2005-05-03 20:58:47.000000000 +0530 >@@ -151,6 +151,13 @@ > errno = save_errno; > } > >+static void >+sigterm_handler(int sig) >+{ >+ session_destroy_all(NULL); >+ exit(0); >+} >+ > /* > * Make packets from buffered stderr data, and buffer it for sending > * to the client. >@@ -501,6 +508,7 @@ > /* Initialize the SIGCHLD kludge. */ > child_terminated = 0; > mysignal(SIGCHLD, sigchld_handler); >+ mysignal(SIGTERM, sigterm_handler); > > /* Initialize our global variables. */ > fdin = fdin_arg; >@@ -673,6 +681,7 @@ > > /* We no longer want our SIGCHLD handler to be called. */ > mysignal(SIGCHLD, SIG_DFL); >+ mysignal(SIGTERM, SIG_DFL); > > while ((wait_pid = waitpid(-1, &wait_status, 0)) < 0) > if (errno != EINTR) >@@ -745,6 +754,7 @@ > debug("Entering interactive session for SSH2."); > > mysignal(SIGCHLD, sigchld_handler); >+ mysignal(SIGTERM, sigterm_handler); > child_terminated = 0; > connection_in = packet_get_connection_in(); > connection_out = packet_get_connection_out();
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1029
:
895
|
897
|
909
|
1016