summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2014-02-09 16:10:17 +0000
committerColin Watson <cjwatson@debian.org>2016-08-07 12:18:44 +0100
commit8d765e441787d024e76369496316105fe736d3ba (patch)
treed8936a2e29d800c64597128389194d28eb8a50d8
parentdb85bf41862b80b0447777d942a091cd3ac5f1c1 (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 71fad9e54..837409bf2 100644
--- a/sshd.c
+++ b/sshd.c
@@ -2107,6 +2107,16 @@ main(int ac, char **av)
2107 } 2107 }
2108 } 2108 }
2109 2109
2110 if (getenv("SSH_SIGSTOP")) {
2111 /* Tell service supervisor that we are ready. */
2112 kill(getpid(), SIGSTOP);
2113 /* The service supervisor only ever expects a single
2114 * STOP signal, so do not ever signal it again, even
2115 * in the case of a re-exec or future children.
2116 */
2117 unsetenv("SSH_SIGSTOP");
2118 }
2119
2110 /* Accept a connection and return in a forked child */ 2120 /* Accept a connection and return in a forked child */
2111 server_accept_loop(&sock_in, &sock_out, 2121 server_accept_loop(&sock_in, &sock_out,
2112 &newsock, config_s); 2122 &newsock, config_s);