[2243] in Kerberos-V5-bugs
krb5b7: telnetd: ttloop() needs to reset read() on EINTR
daemon@ATHENA.MIT.EDU (Jonathan I. Kamens)
Tue Sep 17 17:19:56 1996
Date: Tue, 17 Sep 1996 17:16:52 -0400
From: "Jonathan I. Kamens" <jik@jik.tiac.net>
To: krb5-bugs@MIT.EDU, kerberos@MIT.EDU
The ttloop() function in telnetd needs to retry read() if it gets a
negative return value and errno is EINTR. Here's a patch:
--- telnetd/utility.c 1996/09/17 20:08:33 1.1
+++ telnetd/utility.c 1996/09/17 20:41:40 1.2
@@ -59,8 +59,11 @@
if (nfrontp-nbackp) {
netflush();
}
+read_again:
ncc = read(net, netibuf, sizeof netibuf);
if (ncc < 0) {
+ if (errno == EINTR)
+ goto read_again;
syslog(LOG_INFO, "ttloop: read: %m");
exit(1);
} else if (ncc == 0) {