]> git.donarmstrong.com Git - unscd.git/blob - debian/patches/notify_systemd_about_successful_startup
Add systemd notification support for startup error reporting
[unscd.git] / debian / patches / notify_systemd_about_successful_startup
1 From: =?utf-8?q?Ferenc_W=C3=A1gner?= <wferi@debian.org>
2 Date: Thu, 31 May 2018 11:56:10 +0200
3 Subject: Notify systemd about successful startup
4
5 ---
6  nscd.c | 4 ++++
7  1 file changed, 4 insertions(+)
8
9 diff --git a/nscd.c b/nscd.c
10 index 828eb17..4cbd7b1 100644
11 --- a/nscd.c
12 +++ b/nscd.c
13 @@ -99,6 +99,8 @@ vda.linux@googlemail.com
14  /* For inet_ntoa (for debug build only) */
15  #include <arpa/inet.h>
16  
17 +#include <systemd/sd-daemon.h>
18 +
19  /*
20   * 0.21 add SEGV reporting to worker
21   * 0.22 don't do freeaddrinfo() in GETAI worker, it's crashy
22 @@ -2661,6 +2663,8 @@ int main(int argc, char **argv)
23                 config.nttl[n] *= 1000;
24         }
25  
26 +       sd_notify (0, "READY=1");
27 +
28         main_loop();
29  
30         return 0;