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>2014-04-14 12:09:31 +0100
commitcfeaa0ba2ce2859573f7e980be09ef05511f56a2 (patch)
tree8581760e9eabbfa4c7dd3179550282149d105e89 /sshd.c
parentb7df8fdb32f3d33b70ff8733cb0c39417e367534 (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 665c0b91d..09644914c 100644
--- a/sshd.c
+++ b/sshd.c
@@ -1931,6 +1931,16 @@ main(int ac, char **av)
1931 } 1931 }
1932 } 1932 }
1933 1933
1934 if (getenv("SSH_SIGSTOP")) {
1935 /* Tell service supervisor that we are ready. */
1936 kill(getpid(), SIGSTOP);
1937 /* The service supervisor only ever expects a single
1938 * STOP signal, so do not ever signal it again, even
1939 * in the case of a re-exec or future children.
1940 */
1941 unsetenv("SSH_SIGSTOP");
1942 }
1943
1934 /* Accept a connection and return in a forked child */ 1944 /* Accept a connection and return in a forked child */
1935 server_accept_loop(&sock_in, &sock_out, 1945 server_accept_loop(&sock_in, &sock_out,
1936 &newsock, config_s); 1946 &newsock, config_s);