summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2015-02-24 11:36:34 -0500
committerNick Mathewson <nickm@torproject.org>2015-02-24 11:36:34 -0500
commit3e9409ef58139d557bb7e9bd7536896a88a5d6e9 (patch)
treecfc49b8513bf8af3e6020ab0bbf7d87c97fd5725 /src
parente49d63a7cedf9a71ffc57a81941a5dbd1af227c1 (diff)
parent783a44f9e98953e3359fd5ccc1788d993808fa64 (diff)
downloadtor-3e9409ef58139d557bb7e9bd7536896a88a5d6e9.tar.gz
tor-3e9409ef58139d557bb7e9bd7536896a88a5d6e9.zip
Merge remote-tracking branch 'origin/maint-0.2.6'
Diffstat (limited to 'src')
-rw-r--r--src/or/main.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/or/main.c b/src/or/main.c
index 2ef7a7482e..bc89458e87 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -2071,8 +2071,17 @@ do_main_loop(void)
#endif
#ifdef HAVE_SYSTEMD
- log_notice(LD_GENERAL, "Signaling readiness to systemd");
- sd_notify(0, "READY=1");
+ {
+ const int r = sd_notify(0, "READY=1");
+ if (r < 0) {
+ log_warn(LD_GENERAL, "Unable to send readiness to systemd: %s",
+ strerror(r));
+ } else if (r > 0) {
+ log_notice(LD_GENERAL, "Signaled readiness to systemd");
+ } else {
+ log_info(LD_GENERAL, "Systemd NOTIFY_SOCKET not present.");
+ }
+ }
#endif
for (;;) {