commit 11a65377da8fc198d15cf041dbbbb9718e5798cd from: dok via: Hiltjo Posthuma date: Sun Jan 27 14:26:04 2019 UTC Use slow path if stdin is a tty 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. commit - bbc464dc80225b8cf9390f14fac6c682f63940d2 commit + 11a65377da8fc198d15cf041dbbbb9718e5798cd blob - 5c835dd383f3bf5472f1c1ac58a60db5c006c018 blob + 6b8f51b564551a8ffbeae5979ed9891f41b05064 --- dmenu.c +++ dmenu.c @@ -6,9 +6,7 @@ #include #include #include -#ifdef __OpenBSD__ #include -#endif #include #include @@ -754,7 +752,7 @@ main(int argc, char *argv[]) die("pledge"); #endif - if (fast) { + if (fast && !isatty(0)) { grabkeyboard(); readstdin(); } else {