aboutsummaryrefslogtreecommitdiff
path: root/notify.c
diff options
context:
space:
mode:
Diffstat (limited to 'notify.c')
-rw-r--r--notify.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/notify.c b/notify.c
index 09e230a0..7cd22ccb 100644
--- a/notify.c
+++ b/notify.c
@@ -59,7 +59,11 @@ notify_notify(const struct terminal *term, const char *title, const char *body,
/* Redirect stdin to /dev/null, but ignore failure to open */
int devnull = open("/dev/null", O_RDONLY);
- spawn(term->reaper, NULL, argv, devnull, -1, -1, NULL);
+ pid_t pid = spawn(
+ term->reaper, NULL, argv, devnull, stdout_fds[1], -1,
+ &notif_done, (void *)term, NULL);
+
+ if (stdout_fds[1] >= 0) {
if (devnull >= 0)
close(devnull);