Mail Archives: cygwin/2000/11/08/14:03:08
------=_NextPart_000_001B_01C049CF.2CE66B10
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
>
> It may be a real problem and I appreciate your attempts to track it
> down but since this seems to be working fine for the vast majority of
> things which use the pty, I don't think I'll be fixing it any time soon.
>
> If someone else would like to take a stab at this (hah?) that would be
> swell.
>
Attached is the half-hearted patch against 1.1.5-4 (relative to
winsup/cygwin). The problem happens when someone reads from master side of pty
using 1 byte buffer and onlcr is enabled. In this case read gets CR and
appears to hang after that before it gets NL. It looks, like it "hangs" at the
end of line. The same problem seems to be with select after CR was read - it
thinks, no input is available.
Forgive me my horrible c++; I still do not quite understand all these
inheritance isuues. But the patch appears to work.
-andrej
------=_NextPart_000_001B_01C049CF.2CE66B10
Content-Type: application/octet-stream;
name="cygwin-select.diff"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="cygwin-select.diff"
--- fhandler.h.org Wed Nov 1 08:14:24 2000=0A=
+++ fhandler.h Wed Nov 8 21:17:51 2000=0A=
@@ -720,6 +720,8 @@=0A=
=0A=
void set_close_on_exec (int val);=0A=
BOOL hit_eof ();=0A=
+ select_record *select_read (select_record *s);=0A=
+ int ready_for_read (int fd, DWORD howlong, int ignra);=0A=
};=0A=
=0A=
class fhandler_tty_master: public fhandler_pty_master=0A=
--- select.cc.org Tue Oct 10 03:00:52 2000=0A=
+++ select.cc Wed Nov 8 21:47:09 2000=0A=
@@ -726,6 +726,30 @@=0A=
}=0A=
=0A=
select_record *=0A=
+fhandler_pty_master::select_read (select_record *s)=0A=
+{=0A=
+ if (need_nl) {=0A=
+ if (!s)=0A=
+ {=0A=
+ s =3D new select_record;=0A=
+ s->startup =3D no_startup;=0A=
+ s->poll =3D set_bits;=0A=
+ s->verify =3D no_verify;=0A=
+ }=0A=
+ s->h =3D get_handle ();=0A=
+ s->read_selected =3D TRUE;=0A=
+ return s;=0A=
+ } else=0A=
+ return fhandler_tty_common::select_read(s);=0A=
+}=0A=
+=0A=
+int=0A=
+fhandler_pty_master::ready_for_read (int fd, DWORD howlong, int ignra)=0A=
+{=0A=
+ return need_nl ? 1 : fhandler_tty_common::ready_for_read (fd, =
howlong, ignra);=0A=
+}=0A=
+=0A=
+select_record *=0A=
fhandler_dev_null::select_read (select_record *s)=0A=
{=0A=
if (!s)=0A=
------=_NextPart_000_001B_01C049CF.2CE66B10
Content-Type: text/plain; charset=us-ascii
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
------=_NextPart_000_001B_01C049CF.2CE66B10--
- Raw text -