summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2014-02-09 16:10:17 +0000
committerColin Watson <cjwatson@debian.org>2015-08-19 16:33:33 +0100
commita8e779107942d044d281461c609ec29129dec51e (patch)
tree5bb3dead4f7739692c8aa8ccaf86fcbaf9fa3b4a
parent02662744e60e6bbe532ff22c7f563026a7424b6c (diff)
Support synchronisation with service supervisor using SIGSTOP
Author: Robie Basak <robie.basak@ubuntu.com> Forwarded: no Last-Update: 2014-04-14 Patch-Name: sigstop.patch
-rw-r--r--sshd.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/sshd.c b/sshd.c
index 543596818..f8db3ae60 100644
--- a/sshd.c
+++ b/sshd.c
@@ -2030,6 +2030,16 @@ main(int ac, char **av)
2030 } 2030 }
2031 } 2031 }
2032 2032
2033 if (getenv("SSH_SIGSTOP")) {
2034 /* Tell service supervisor that we are ready. */
2035 kill(getpid(), SIGSTOP);
2036 /* The service supervisor only ever expects a single
2037 * STOP signal, so do not ever signal it again, even
2038 * in the case of a re-exec or future children.
2039 */
2040 unsetenv("SSH_SIGSTOP");
2041 }
2042
2033 /* Accept a connection and return in a forked child */ 2043 /* Accept a connection and return in a forked child */
2034 server_accept_loop(&sock_in, &sock_out, 2044 server_accept_loop(&sock_in, &sock_out,
2035 &newsock, config_s); 2045 &newsock, config_s);