Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Oct 2005 00:36:40 GMT
From:      kapil <kapiltj@yahoo.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   misc/87022: telnet hang in ptcout
Message-ID:  <200510070036.j970aedW039761@www.freebsd.org>
Resent-Message-ID: <200510070040.j970eCcm055931@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         87022
>Category:       misc
>Synopsis:       telnet hang in ptcout
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Oct 07 00:40:12 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     kapil
>Release:        4.11
>Organization:
>Environment:
4.11-RELEASE-p10
>Description:
              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.
>How-To-Repeat:
              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)
>Fix:
              One fix is to not call interrupt/ptyflush unless the slave tty has been opened.
In the kernel, probably there should be a way to awaken the sleeping process once the connection goes away. It doesn't seem to be.
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200510070036.j970aedW039761>