Avoid sending SD_NOTIFY from wrong processes (#1427526)
This commit is contained in:
parent
ab7f9474c7
commit
b83281f89d
@ -84,16 +84,15 @@ index 816611c..b8b9d13 100644
|
|||||||
#include "xmalloc.h"
|
#include "xmalloc.h"
|
||||||
#include "ssh.h"
|
#include "ssh.h"
|
||||||
#include "ssh2.h"
|
#include "ssh2.h"
|
||||||
@@ -1833,6 +1837,11 @@ main(int ac, char **av)
|
@@ -1888,6 +1892,11 @@ main(int ac, char **av)
|
||||||
/* ignore SIGPIPE */
|
}
|
||||||
signal(SIGPIPE, SIG_IGN);
|
}
|
||||||
|
|
||||||
+#ifdef HAVE_SYSTEMD
|
+#ifdef HAVE_SYSTEMD
|
||||||
+ /* Signal systemd that we are ready to accept connections */
|
+ /* Signal systemd that we are ready to accept connections */
|
||||||
+ sd_notify(0, "READY=1");
|
+ sd_notify(0, "READY=1");
|
||||||
+#endif
|
+#endif
|
||||||
+
|
+
|
||||||
/* Get a connection, either from inetd or a listening TCP socket */
|
/* Accept a connection and return in a forked child */
|
||||||
if (inetd_flag) {
|
server_accept_loop(&sock_in, &sock_out,
|
||||||
server_accept_inetd(&sock_in, &sock_out);
|
&newsock, config_s);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user