X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fngircd%2Fsighandlers.c;h=00f5ae8555708e1c616f54a5263916a14311720b;hb=HEAD;hp=56fd8aea2382a6d588220eb3a7ba1a241384d989;hpb=e4873b4d63d0bcd4914a1cee82599a13cfd77e47;p=ngircd-alex.git diff --git a/src/ngircd/sighandlers.c b/src/ngircd/sighandlers.c index 56fd8aea..00f5ae85 100644 --- a/src/ngircd/sighandlers.c +++ b/src/ngircd/sighandlers.c @@ -348,6 +348,21 @@ Signals_Exit(void) signalpipe[0] = signalpipe[1] = 0; } +/** + * Check if the service manager of the system can be notified. + * + * @returns true if notifying the service manager is theoretically possible. + */ +GLOBAL bool +Signal_NotifySvcMgr_Possible(void) +{ +#if !defined(HAVE_SYS_UN_H) || !defined(SOCK_CLOEXEC) + return false; +#else + return getenv("NOTIFY_SOCKET") != NULL; +#endif +} + /** * Notify the service manager using the "sd_notify" protocol. *