diff options
author | Colin Watson <cjwatson@debian.org> | 2014-02-09 16:10:17 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2016-12-26 00:56:00 +0000 |
commit | e6e10c563bbe69426d5074b0b97e2a9b0b4b3b49 (patch) | |
tree | 1cda242fb8d1952937d3a41355ade5bd4d9ce697 /sshd.c | |
parent | 7e6bb45ce4ead0e3256d1741e0020bc5d4e6a09b (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
@@ -1878,6 +1878,16 @@ main(int ac, char **av) | |||
1878 | } | 1878 | } |
1879 | } | 1879 | } |
1880 | 1880 | ||
1881 | if (getenv("SSH_SIGSTOP")) { | ||
1882 | /* Tell service supervisor that we are ready. */ | ||
1883 | kill(getpid(), SIGSTOP); | ||
1884 | /* The service supervisor only ever expects a single | ||
1885 | * STOP signal, so do not ever signal it again, even | ||
1886 | * in the case of a re-exec or future children. | ||
1887 | */ | ||
1888 | unsetenv("SSH_SIGSTOP"); | ||
1889 | } | ||
1890 | |||
1881 | /* Accept a connection and return in a forked child */ | 1891 | /* Accept a connection and return in a forked child */ |
1882 | server_accept_loop(&sock_in, &sock_out, | 1892 | server_accept_loop(&sock_in, &sock_out, |
1883 | &newsock, config_s); | 1893 | &newsock, config_s); |