From tlyu@MIT.EDU Thu Oct 10 12:56:42 1996 Received: from MIT.EDU (SOUTH-STATION-ANNEX.MIT.EDU [18.72.1.2]) by rt-11.MIT.EDU (8.7.5/8.7.3) with SMTP id MAA28995 for ; Thu, 10 Oct 1996 12:56:41 -0400 Received: from TESLA-COIL.MIT.EDU by MIT.EDU with SMTP id AA25092; Thu, 10 Oct 96 12:56:40 EDT Received: by tesla-coil.MIT.EDU (5.x/4.7) id AA12311; Thu, 10 Oct 1996 12:56:38 -0400 Message-Id: <199609172116.RAA25782@jik.tiac.net> Date: Tue, 17 Sep 1996 17:16:52 -0400 From: "Jonathan I. Kamens" To: krb5-bugs@MIT.EDU, kerberos@MIT.EDU Subject: krb5b7: telnetd: ttloop() needs to reset read() on EINTR >Number: 100 >Category: telnet >Synopsis: krb5b7: telnetd: ttloop() needs to reset read() on EINTR >Confidential: yes >Severity: serious >Priority: high >Responsible: hartmans >State: closed >Class: sw-bug >Submitter-Id: unknown >Arrival-Date: Thu Oct e 12:57:08 EDT 1996 >Last-Modified: Mon Oct e 02:18:09 EDT 1996 >Originator: >Organization: >Release: >Environment: >Description: >How-To-Repeat: >Fix: >Audit-Trail: Responsible-Changed-From-To: gnats-admin->hartmans Responsible-Changed-By: tlyu Responsible-Changed-When: Thu Oct 10 13:07:42 1996 Responsible-Changed-Why: refiled State-Changed-From-To: open-closed State-Changed-By: hartmans State-Changed-When: Mon Oct 14 02:17:56 1996 State-Changed-Why: Again, already applied. >Unformatted: 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) {