telnetd hang

kapil jain kapiltj at yahoo.com
Thu Oct 6 17:53:56 PDT 2005


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


More information about the freebsd-net mailing list