www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/1999/03/31/01:51:09

Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm
Sender: cygwin-developers-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin-developers AT sourceware DOT cygnus DOT com
Date: Wed, 31 Mar 1999 01:51:42 -0500
From: Chris Faylor <cgf AT cygnus DOT com>
To: cygwin-developers AT sourceware DOT cygnus DOT com
Subject: Re: Latest tty changes.
Message-ID: <19990331015141.A2732@cygnus.com>
References: <00fb01be7acd$19be2a50$02af6080 AT sokhapki-1 DOT cc DOT bellcore DOT com>
Mime-Version: 1.0
X-Mailer: Mutt 0.95.3i
In-Reply-To: <00fb01be7acd$19be2a50$02af6080@sokhapki-1.cc.bellcore.com>; from Sergey Okhapkin on Tue, Mar 30, 1999 at 11:48:12AM -0500

On Tue, Mar 30, 1999 at 11:48:12AM -0500, Sergey Okhapkin wrote:
>
>
>>>The problem with login via telnetd remains the same :(
>>>
>>>After typing the username and LF (or CR), the connection is lost.
>>>
>>
>>
>>fhandler_tty_slave::read() always returns EOF because
>>fhandler_pty_master::write() doesn't set ttyp->read_retval to a number of
>>chars written.
>
>pty support is broken now because of a mix of two _very different_ things in
>code - tc and ttyp.

Actually they aren't that different but that insight is much
appreciated.  I didn't get this in in time for the snapshot but I have,
at least temporarily, gotten remote telnet logins working by simply
assigning tc = ttyp, where appropriate.

You all should see this on Thursday or, if you're interested, the patch is
below.

-chris

Index: fhandler.h
===================================================================
RCS file: /cvs/cvsfiles/devo/winsup/fhandler.h,v
retrieving revision 1.81
diff -u -p -r1.81 fhandler.h
--- fhandler.h	1999/03/28 21:58:58	1.81
+++ fhandler.h	1999/03/31 06:44:27
@@ -579,7 +579,7 @@ public:
     fhandler_termios (dev, name, unit, cygwin_shared->tty[unit])
   {
     ttynum = unit;
-    ttyp = cygwin_shared->tty[unit];
+    tc = ttyp = cygwin_shared->tty[unit];
   }
   HANDLE output_done_event;	// Raised by master when tty's output buffer
 				// written. Write status in tty::write_retval.
Index: fhandler_tty.cc
===================================================================
RCS file: /cvs/cvsfiles/devo/winsup/fhandler_tty.cc,v
retrieving revision 1.19
diff -u -p -r1.19 fhandler_tty.cc
--- fhandler_tty.cc	1999/03/30 03:50:38	1.19
+++ fhandler_tty.cc	1999/03/31 06:44:28
@@ -56,7 +56,7 @@ fhandler_tty_master::init (int ntty)
       return -1;
     }
 
-  ttyp = cygwin_shared->tty[ntty];
+  tc = ttyp = cygwin_shared->tty[ntty];
   ttynum = ntty;
 
   console->init (err, GENERIC_READ | GENERIC_WRITE, O_BINARY);
@@ -69,7 +69,9 @@ fhandler_tty_master::init (int ntty)
   ti.c_iflag = INLCR;
   ti.c_lflag = ECHO | ICANON | ISIG;
 
+#if 0	/* FIXME: Should be handled by console->init above */
   console->tcsetattr (0, &ti);
+#endif
 
   ttyp->common_init (this);
 
@@ -695,7 +697,7 @@ fhandler_tty_common::dup (fhandler_base 
 {
   fhandler_tty_slave *fts = (fhandler_tty_slave *) child;
   fts->ttynum = ttynum;
-  fts->ttyp = ttyp;
+  fts->tc = fts->ttyp = ttyp;
   return 0;
 }
 
Index: tty.cc
===================================================================
RCS file: /cvs/cvsfiles/devo/winsup/tty.cc,v
retrieving revision 1.29
diff -u -p -r1.29 tty.cc
--- tty.cc	1999/03/25 03:22:48	1.29
+++ tty.cc	1999/03/31 06:44:29
@@ -339,7 +339,7 @@ tty::make_pipes (fhandler_pty_master *pt
 BOOL
 tty::common_init (fhandler_pty_master *ptym)
 {
-  ptym->ttyp = this;
+  ptym->tc = ptym->ttyp = this;
   if (!make_pipes (ptym))
     return FALSE;
   ptym->neednl_ = 0;

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019