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-08-19 17:11:49 +0100
commitb0b95d9689563856ac4992c90b65ed4fd8f3fae6 (patch)
treeceb161d3ac7183803729b4ffbf685e71eb8b309c /sshd.c
parentf3e58419e41e29f5d03c2d91f4576febac922112 (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 7886d0eac..cc8ecaff4 100644
--- a/sshd.c
+++ b/sshd.c
@@ -2038,6 +2038,16 @@ main(int ac, char **av)
2038 } 2038 }
2039 } 2039 }
2040 2040
2041 if (getenv("SSH_SIGSTOP")) {
2042 /* Tell service supervisor that we are ready. */
2043 kill(getpid(), SIGSTOP);
2044 /* The service supervisor only ever expects a single
2045 * STOP signal, so do not ever signal it again, even
2046 * in the case of a re-exec or future children.
2047 */
2048 unsetenv("SSH_SIGSTOP");
2049 }
2050
2041 /* Accept a connection and return in a forked child */ 2051 /* Accept a connection and return in a forked child */
2042 server_accept_loop(&sock_in, &sock_out, 2052 server_accept_loop(&sock_in, &sock_out,
2043 &newsock, config_s); 2053 &newsock, config_s);