[PATCH 1/2] sulogin: make --timeout actually time out

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Bjørn Mork <bjorn@xxxxxxx>
---
 login-utils/sulogin.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/login-utils/sulogin.c b/login-utils/sulogin.c
index 1c4313af4647..6a3890e80a16 100644
--- a/login-utils/sulogin.c
+++ b/login-utils/sulogin.c
@@ -644,7 +644,7 @@ static char *getpasswd(struct console *con)
 	eightbit = ((con->flags & CON_SERIAL) == 0 || (tty.c_cflag & (PARODD|PARENB)) == 0);
 	while (cp->eol == '\0') {
 		if (read(fd, &c, 1) < 1) {
-			if (errno == EINTR || errno == EAGAIN) {
+			if ((errno == EINTR && !alarm_rised) || errno == EAGAIN) {
 				xusleep(250000);
 				continue;
 			}
-- 
2.10.2

--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux