summaryrefslogtreecommitdiffstats
path: root/src/notify/notify.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/notify/notify.c')
-rw-r--r--src/notify/notify.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/notify/notify.c b/src/notify/notify.c
index 8489b83873..21e004e417 100644
--- a/src/notify/notify.c
+++ b/src/notify/notify.c
@@ -467,6 +467,11 @@ static int run(int argc, char* argv[]) {
return log_error_errno(errno, "Failed to execute command line: %s", cmdline);
}
+ /* The DEFINE_MAIN_FUNCTION_WITH_POSITIVE_FAILURE() boilerplate will send the exit status via
+ * sd_notify(). Which is normally fine, but very confusing in systemd-notify, whose purpose is to
+ * send user-controllable notification messages, and not implicit ones. Let's turn if off, by
+ * unsetting the $NOTIFY_SOCKET environment variable. */
+ (void) unsetenv("NOTIFY_SOCKET");
return 0;
}