Bugzilla – Attachment 909 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]
Patch for Protocol 2 support
SIGTERM.patch (text/plain), 1.89 KB, created by
senthilkumar
on 2005-05-12 23:41:11 AEST
(
hide
)
Description:
Patch for Protocol 2 support
Filename:
MIME Type:
Creator:
senthilkumar
Created:
2005-05-12 23:41:11 AEST
Size:
1.89 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-12 15:34:04.000000000 +0530 >@@ -89,6 +89,7 @@ > */ > > static volatile sig_atomic_t child_terminated = 0; /* The child has terminated. */ >+static volatile sig_atomic_t received_sigterm = 0; > > /* prototypes */ > static void server_init_dispatch(void); >@@ -151,6 +152,12 @@ > errno = save_errno; > } > >+static void >+sigterm_handler(int sig) >+{ >+received_sigterm = 1; >+} >+ > /* > * 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; >@@ -629,6 +637,9 @@ > wait_until_can_do_something(&readset, &writeset, &max_fd, > &nalloc, max_time_milliseconds); > >+ if (received_sigterm) >+ cleanup_exit(255); >+ > /* Process any channel events. */ > channel_after_select(readset, writeset); > >@@ -745,6 +756,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(); >@@ -775,6 +787,10 @@ > kex_send_kexinit(xxx_kex); > } > } >+ >+ if (received_sigterm) >+ cleanup_exit(255); >+ > process_input(readset); > if (connection_closed) > break;
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