diff options
author | Colin Watson <cjwatson@debian.org> | 2014-02-09 16:10:17 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2017-03-29 01:40:55 +0100 |
commit | a91715df66fc2a0b7792e87a864c334f4cb15043 (patch) | |
tree | 94ad2d3975a2bbd8422cc4026d76ad0eb88d5e78 /sshd.c | |
parent | abf7f03362e0cc4855355a7b7c9b76b6963a75cd (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
@@ -1892,6 +1892,16 @@ main(int ac, char **av) | |||
1892 | } | 1892 | } |
1893 | } | 1893 | } |
1894 | 1894 | ||
1895 | if (getenv("SSH_SIGSTOP")) { | ||
1896 | /* Tell service supervisor that we are ready. */ | ||
1897 | kill(getpid(), SIGSTOP); | ||
1898 | /* The service supervisor only ever expects a single | ||
1899 | * STOP signal, so do not ever signal it again, even | ||
1900 | * in the case of a re-exec or future children. | ||
1901 | */ | ||
1902 | unsetenv("SSH_SIGSTOP"); | ||
1903 | } | ||
1904 | |||
1895 | /* Accept a connection and return in a forked child */ | 1905 | /* Accept a connection and return in a forked child */ |
1896 | server_accept_loop(&sock_in, &sock_out, | 1906 | server_accept_loop(&sock_in, &sock_out, |
1897 | &newsock, config_s); | 1907 | &newsock, config_s); |