diff options
author | Leonardo Hernández Hernández <leohdz172@proton.me> | 2024-06-27 13:19:16 -0600 |
---|---|---|
committer | Leonardo Hernández Hernández <leohdz172@proton.me> | 2024-07-01 20:40:54 -0600 |
commit | 71f11e6cf63289d51f152469a0da81a85fe2608c (patch) | |
tree | c5b63e1836cfaf5289bcdc2938cac15d2e09e3f4 /dwl.c | |
parent | 2b4893a0ad57fb5234c48615a2e531401efcf69c (diff) |
set O_NONBLOCK flag to stdout
Diffstat (limited to 'dwl.c')
-rw-r--r-- | dwl.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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 |