diff options
author | Colin Watson <cjwatson@debian.org> | 2014-02-09 16:10:17 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2015-08-19 16:33:33 +0100 |
commit | a8e779107942d044d281461c609ec29129dec51e (patch) | |
tree | 5bb3dead4f7739692c8aa8ccaf86fcbaf9fa3b4a /sshd.c | |
parent | 02662744e60e6bbe532ff22c7f563026a7424b6c (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.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -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); |