From owner-freebsd-net@FreeBSD.ORG Fri Oct 7 00:53:56 2005 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2305F16A41F for ; Fri, 7 Oct 2005 00:53:55 +0000 (GMT) (envelope-from kapiltj@yahoo.com) Received: from web81102.mail.yahoo.com (web81102.mail.yahoo.com [206.190.37.161]) by mx1.FreeBSD.org (Postfix) with SMTP id 6E73C43D46 for ; Fri, 7 Oct 2005 00:53:55 +0000 (GMT) (envelope-from kapiltj@yahoo.com) Received: (qmail 92131 invoked by uid 60001); 7 Oct 2005 00:53:54 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=WEcrmcm7uEhWUq2s5STFm9giUW345aJR7O3wDzzysGvk9CPooKM9TjfQFTwJ6FWunKoyXwhD3d3IPR3mPRqFHyQyWF9lw87ltRbwdCtSwJranfPxUZzSRGpabhcAZpx9QrZki6cndcPSxe1m9VHwvcTrL9emFydRuewbv92pPa0= ; Message-ID: <20051007005354.92129.qmail@web81102.mail.yahoo.com> Received: from [66.129.224.36] by web81102.mail.yahoo.com via HTTP; Thu, 06 Oct 2005 17:53:54 PDT Date: Thu, 6 Oct 2005 17:53:54 -0700 (PDT) From: kapil jain To: freebsd-net@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Subject: telnetd hang X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Oct 2005 00:53:56 -0000 Hello, I am seeing this problem in all versions of telnet: If some characters and a cntrl C is entered on a telnet session before the child for slave tty is forked, the ptyflush will hang on write call, since slave tty is not open and will just wait there. An easy way to reproduce this problem is: set connection limit on telnet to 1 (using inetd.conf). Connect the 1st and 2nd session. 2nd session will not show the login prompt. Here enter one or more characters and then ctrl C. Now exit the 1st session. The second sessions telentd is spawned but hangs on ptcout. Even if you exit the session, no more telnet sessions are allowed (unless connection limit is increased or telentd is killed) - My question is: does a change need to be made in telnetd to handle this case or should this have already been done in the kernel to wake up the process when the connection on the remote end closes. thanks kapil