summaryrefslogtreecommitdiff
path: root/sshd.c
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2013-08-12 15:53:56 +0200
committerColin Watson <cjwatson@debian.org>2013-08-12 15:53:56 +0200
commit0334ce32304e9ba2a10ee5ca49ca6e8ff3ba6cf4 (patch)
treebf9a3cd717edbc42f98d7c3b31cfb64367aafadd /sshd.c
parent1f710a2fdb64a1a7df0f0fcf074a0b5f73719ca5 (diff)
When running under Upstart, only consider the daemon started once it is
ready to accept connections (by raising SIGSTOP at that point and using "expect stop").
Diffstat (limited to 'sshd.c')
-rw-r--r--sshd.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sshd.c b/sshd.c
index 64c564236..0c260a50d 100644
--- a/sshd.c
+++ b/sshd.c
@@ -1855,6 +1855,10 @@ main(int ac, char **av)
1855 } 1855 }
1856 } 1856 }
1857 1857
1858 if (getenv("SSH_SIGSTOP"))
1859 /* Tell service supervisor that we are ready. */
1860 kill(getpid(), SIGSTOP);
1861
1858 /* Accept a connection and return in a forked child */ 1862 /* Accept a connection and return in a forked child */
1859 server_accept_loop(&sock_in, &sock_out, 1863 server_accept_loop(&sock_in, &sock_out,
1860 &newsock, config_s); 1864 &newsock, config_s);