From owner-freebsd-bugs Sun Jan 12 10:40:04 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id KAA10115 for bugs-outgoing; Sun, 12 Jan 1997 10:40:04 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id KAA10082; Sun, 12 Jan 1997 10:40:02 -0800 (PST) Date: Sun, 12 Jan 1997 10:40:02 -0800 (PST) Message-Id: <199701121840.KAA10082@freefall.freebsd.org> To: freebsd-bugs Cc: From: j@uriah.heep.sax.de (J Wunsch) Subject: Re: bin/2466: telnet sleeps too much :-) Reply-To: j@uriah.heep.sax.de (J Wunsch) Sender: owner-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk The following reply was made to PR bin/2466; it has been noted by GNATS. From: j@uriah.heep.sax.de (J Wunsch) To: andrew@ugh.net.au Cc: freebsd-gnats-submit@FreeBSD.ORG Subject: Re: bin/2466: telnet sleeps too much :-) Date: Sun, 12 Jan 1997 19:10:12 +0100 As andrew@ugh.net.au wrote: > If you leave telnet idle and then type something it will say "sleep(5) > from telnet, after select". It will continue to work but it messes up > the screen. > >How-To-Repeat: > telnet somewhere and leave it idle for a while, come back to it and type. No, this is not generally repeatable. I suspect something special with your network setup. Perhaps you add a debug printf to see what the actual error code is. The code in question (modulo some tn3720 hack) is: if ((c = select(16, &ibits, &obits, &xbits, (poll == 0)? (struct timeval *)0 : &TimeValue)) < 0) { if (c == -1) { /* * we can get EINTR if we are in line mode, * and the user does an escape (TSTP), or * some other signal generator. */ if (errno == EINTR) { return 0; } /* I don't like this, does it ever happen? */ printf("sleep(5) from telnet, after select\r\n"); sleep(5); } return 0; } ...so the sleep only happens after select() returned -1 (nothing found) but without EINTR. This is a ``Cannot happen'' situation. Perhaps you can investigate a little why it happens in your environment. (Mind you, many people leave telnet sessions idle for days.) -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)