diff options
author | Jakub Jelinek <jakub@redhat.com> | 2007-10-10 21:00:50 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2007-10-10 21:00:50 +0000 |
commit | fc2a4f5f837f259c239fbd15911f80ca8c6907e3 (patch) | |
tree | 2be478cfcb93051f657027d6fafd96778aa49317 /login | |
parent | 75cb5a0d471729d28a59b693441e2d527c9e962e (diff) |
Updated to fedora-glibc-20071010T2047cvs/fedora-glibc-2_6_90-18
Diffstat (limited to 'login')
-rw-r--r-- | login/login_tty.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/login/login_tty.c b/login/login_tty.c index 1bb1703267..2ba276d4a9 100644 --- a/login/login_tty.c +++ b/login/login_tty.c @@ -31,6 +31,7 @@ static char sccsid[] = "@(#)login_tty.c 8.1 (Berkeley) 6/4/93"; #endif /* LIBC_SCCS and not lint */ +#include <errno.h> #include <sys/param.h> #include <sys/ioctl.h> #include <unistd.h> @@ -63,9 +64,12 @@ login_tty(fd) } } #endif - (void) dup2(fd, 0); - (void) dup2(fd, 1); - (void) dup2(fd, 2); + while (dup2(fd, 0) == -1 && errno == EBUSY) + ; + while (dup2(fd, 1) == -1 && errno == EBUSY) + ; + while (dup2(fd, 2) == -1 && errno == EBUSY) + ; if (fd > 2) (void) close(fd); return (0); |