Use slow path if stdin is a tty 11a65377
If stdin is a tty and dmenu is ran with the fast option then it's
impossible to close stdin because the keyboard is already grabbed.
dok · 2019-01-26 15:49 1 file(s) · +1 −3
dmenu.c +1 −3
6 6
#include <string.h>
7 7
#include <strings.h>
8 8
#include <time.h>
9 -
#ifdef __OpenBSD__
10 9
#include <unistd.h>
11 -
#endif
12 10
13 11
#include <X11/Xlib.h>
14 12
#include <X11/Xatom.h>
754 752
		die("pledge");
755 753
#endif
756 754
757 -
	if (fast) {
755 +
	if (fast && !isatty(0)) {
758 756
		grabkeyboard();
759 757
		readstdin();
760 758
	} else {