summaryrefslogtreecommitdiff
path: root/sshd.c
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2014-02-09 16:10:17 +0000
committerColin Watson <cjwatson@debian.org>2015-11-29 17:36:19 +0000
commit7ce7aa96b03196d9d799f4caf6e4c7c6c2bed7da (patch)
treed59c66f1ee85db31a03ffc97ce8d80c00332568a /sshd.c
parentd45f510086dc79305ea6cfd336908798fbbda563 (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
Diffstat (limited to 'sshd.c')
-rw-r--r--sshd.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/sshd.c b/sshd.c
index 6024e0e73..7e72b9b84 100644
--- a/sshd.c
+++ b/sshd.c
@@ -2042,6 +2042,16 @@ main(int ac, char **av)
2042 } 2042 }
2043 } 2043 }
2044 2044
2045 if (getenv("SSH_SIGSTOP")) {
2046 /* Tell service supervisor that we are ready. */
2047 kill(getpid(), SIGSTOP);
2048 /* The service supervisor only ever expects a single
2049 * STOP signal, so do not ever signal it again, even
2050 * in the case of a re-exec or future children.
2051 */
2052 unsetenv("SSH_SIGSTOP");
2053 }
2054
2045 /* Accept a connection and return in a forked child */ 2055 /* Accept a connection and return in a forked child */
2046 server_accept_loop(&sock_in, &sock_out, 2056 server_accept_loop(&sock_in, &sock_out,
2047 &newsock, config_s); 2057 &newsock, config_s);