]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/sighandlers.c
ngIRCd Release 27
[ngircd-alex.git] / src / ngircd / sighandlers.c
index 56fd8aea2382a6d588220eb3a7ba1a241384d989..00f5ae8555708e1c616f54a5263916a14311720b 100644 (file)
@@ -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.
  *