From 0334ce32304e9ba2a10ee5ca49ca6e8ff3ba6cf4 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Mon, 12 Aug 2013 15:53:56 +0200 Subject: 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"). --- debian/patches/sigstop.patch | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 debian/patches/sigstop.patch (limited to 'debian/patches/sigstop.patch') diff --git a/debian/patches/sigstop.patch b/debian/patches/sigstop.patch new file mode 100644 index 000000000..42bee0739 --- /dev/null +++ b/debian/patches/sigstop.patch @@ -0,0 +1,20 @@ +Description: Support synchronisation with service supervisor using SIGSTOP +Author: Colin Watson +Forwarded: no +Last-Update: 2013-08-12 + +Index: b/sshd.c +=================================================================== +--- a/sshd.c ++++ b/sshd.c +@@ -1855,6 +1855,10 @@ + } + } + ++ if (getenv("SSH_SIGSTOP")) ++ /* Tell service supervisor that we are ready. */ ++ kill(getpid(), SIGSTOP); ++ + /* Accept a connection and return in a forked child */ + server_accept_loop(&sock_in, &sock_out, + &newsock, config_s); -- cgit v1.2.3