summaryrefslogtreecommitdiff
path: root/dwl.c
diff options
context:
space:
mode:
Diffstat (limited to 'dwl.c')
-rw-r--r--dwl.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/dwl.c b/dwl.c
index 9fb50a7..3175e79 100644
--- a/dwl.c
+++ b/dwl.c
@@ -2190,6 +2190,12 @@ run(char *startup_cmd)
close(piperw[1]);
close(piperw[0]);
}
+
+ /* Mark stdout as non-blocking to avoid people who does not close stdin
+ * nor consumes it in their startup script getting dwl frozen */
+ if (fd_set_nonblock(STDOUT_FILENO) < 0)
+ close(STDOUT_FILENO);
+
printstatus();
/* At this point the outputs are initialized, choose initial selmon based on