Changeset 989 for vendor/current/lib/util/become_daemon.c
- Timestamp:
- Nov 25, 2016, 8:04:54 PM (9 years ago)
- File:
-
- 1 edited
-
vendor/current/lib/util/become_daemon.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/lib/util/become_daemon.c
r988 r989 25 25 #include "system/filesys.h" 26 26 #include "system/locale.h" 27 #if HAVE_LIBSYSTEMD_DAEMON27 #if 28 28 #include <systemd/sd-daemon.h> 29 29 #endif … … 70 70 newpid = fork(); 71 71 if (newpid) { 72 #if HAVE_LIBSYSTEMD_DAEMON72 #if 73 73 sd_notifyf(0, "READY=0\nSTATUS=Starting process...\nMAINPID=%lu", (unsigned long) newpid); 74 74 #endif /* HAVE_LIBSYSTEMD_DAEMON */ … … 99 99 _PUBLIC_ void exit_daemon(const char *msg, int error) 100 100 { 101 #if def HAVE_LIBSYSTEMD_DAEMON101 #if 102 102 if (msg == NULL) { 103 103 msg = strerror(error); … … 118 118 name = "Samba"; 119 119 } 120 #if def HAVE_LIBSYSTEMD_DAEMON120 #if 121 121 sd_notifyf(0, "READY=1\nSTATUS=%s: ready to serve connections...", name); 122 122 #endif … … 130 130 name = "Samba"; 131 131 } 132 #if def HAVE_LIBSYSTEMD_DAEMON132 #if 133 133 sd_notifyf(0, "\nSTATUS=%s: %s", name, msg); 134 134 #endif
Note:
See TracChangeset
for help on using the changeset viewer.
