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>2016-12-23 11:25:03 +0000
commit7140d94420542a8af7459d08436af2fc950cd810 (patch)
tree176d8628c85f3d164ca74f9377a4910e9f7548c0 /sshd.c
parent39cb522642f428a818ef2cd56c39de4783da0b6e (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 747beec8f..414e19eed 100644
--- a/sshd.c
+++ b/sshd.c
@@ -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);