mirror of
https://codeberg.org/FabricSoul/dwl.git
synced 2025-08-03 20:10:23 -04:00
set O_NONBLOCK flag to stdout
This commit is contained in:
parent
2b4893a0ad
commit
71f11e6cf6
3 changed files with 23 additions and 0 deletions
6
dwl.c
6
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue