ubase

suckless linux base utils
git clone git://git.2f30.org/ubase.git
Log | Files | Refs | README | LICENSE

commit 6f1462a49340e2537c4d6b18d7603f03d49a179e
parent d4121c2dbf5194aa69d839606d611799296b0ba4
Author: sin <sin@2f30.org>
Date:   Fri, 16 Jan 2015 16:19:29 +0000

Don't do a blocking open in ttytostr()

Diffstat:
libutil/tty.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libutil/tty.c b/libutil/tty.c @@ -72,7 +72,7 @@ ttytostr(int tty_maj, int tty_min, char *str, size_t n) if ((int)major(sb.st_rdev) == tty_maj && (int)minor(sb.st_rdev) == tty_min) { - fd = open(path, O_RDONLY); + fd = open(path, O_RDONLY | O_NONBLOCK); if (fd < 0) continue; if (isatty(fd)) {