summaryrefslogtreecommitdiff
path: root/debian/patches/sigstop.patch
blob: 3311a797cd78a322eb8b383517e60030312f7025 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Description: Support synchronisation with service supervisor using SIGSTOP
Author: Colin Watson <cjwatson@debian.org>
Forwarded: no
Last-Update: 2013-09-14

Index: b/sshd.c
===================================================================
--- a/sshd.c
+++ b/sshd.c
@@ -1914,6 +1914,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);