diff options
author | Colin Watson <cjwatson@debian.org> | 2013-08-12 15:53:56 +0200 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2013-08-12 15:53:56 +0200 |
commit | 0334ce32304e9ba2a10ee5ca49ca6e8ff3ba6cf4 (patch) | |
tree | bf9a3cd717edbc42f98d7c3b31cfb64367aafadd /sshd.c | |
parent | 1f710a2fdb64a1a7df0f0fcf074a0b5f73719ca5 (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.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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); |