diff options
Diffstat (limited to 'debian/patches/sigstop.patch')
-rw-r--r-- | debian/patches/sigstop.patch | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/debian/patches/sigstop.patch b/debian/patches/sigstop.patch new file mode 100644 index 000000000..91c9d5434 --- /dev/null +++ b/debian/patches/sigstop.patch | |||
@@ -0,0 +1,28 @@ | |||
1 | From d9ac4d127f53d92cf3426fba28ff351e5e165ae2 Mon Sep 17 00:00:00 2001 | ||
2 | From: Colin Watson <cjwatson@debian.org> | ||
3 | Date: Sun, 9 Feb 2014 16:10:17 +0000 | ||
4 | Subject: Support synchronisation with service supervisor using SIGSTOP | ||
5 | |||
6 | Forwarded: no | ||
7 | Last-Update: 2013-09-14 | ||
8 | |||
9 | Patch-Name: sigstop.patch | ||
10 | --- | ||
11 | sshd.c | 4 ++++ | ||
12 | 1 file changed, 4 insertions(+) | ||
13 | |||
14 | diff --git a/sshd.c b/sshd.c | ||
15 | index 665c0b9..ffe360c 100644 | ||
16 | --- a/sshd.c | ||
17 | +++ b/sshd.c | ||
18 | @@ -1931,6 +1931,10 @@ main(int ac, char **av) | ||
19 | } | ||
20 | } | ||
21 | |||
22 | + if (getenv("SSH_SIGSTOP")) | ||
23 | + /* Tell service supervisor that we are ready. */ | ||
24 | + kill(getpid(), SIGSTOP); | ||
25 | + | ||
26 | /* Accept a connection and return in a forked child */ | ||
27 | server_accept_loop(&sock_in, &sock_out, | ||
28 | &newsock, config_s); | ||