svn commit: trunk/busybox/loginutils
vodz at busybox.net
vodz at busybox.net
Tue Dec 13 08:45:32 UTC 2005
Author: vodz
Date: 2005-12-13 00:44:41 -0800 (Tue, 13 Dec 2005)
New Revision: 12857
Log:
remove strange bloat dup2() usage, sync this code with mainstream login-utils, size reduce
Modified:
trunk/busybox/loginutils/getty.c
Changeset:
Modified: trunk/busybox/loginutils/getty.c
===================================================================
--- trunk/busybox/loginutils/getty.c 2005-12-13 08:21:33 UTC (rev 12856)
+++ trunk/busybox/loginutils/getty.c 2005-12-13 08:44:41 UTC (rev 12857)
@@ -528,12 +528,11 @@
/* Open the tty as standard input. */
+ close(0);
debug("open(2)\n");
fd = open(tty, O_RDWR | O_NONBLOCK, 0);
- if (dup2(fd, STDIN_FILENO) == -1)
+ if (fd != 0)
error("/dev/%s: cannot open as standard input: %m", tty);
- close(fd);
-
} else {
/*
More information about the busybox-cvs
mailing list