This is the mail archive of the
cygwin-patches@sources.redhat.com
mailing list for the Cygwin project.
Re: race in tty handling code
- To: cygwin-patches at cygwin dot com
- Subject: Re: race in tty handling code
- From: Egor Duda <deo at logos-m dot ru>
- Date: Thu, 22 Feb 2001 18:54:16 +0300
- Organization: DEO
- References: <2170208116.20010222140316@logos-m.ru>
- Reply-To: Egor Duda <cygwin-patches at cygwin dot com>
Hi!
Thursday, 22 February, 2001 Egor Duda deo@logos-m.ru wrote:
ED> if application performs write to tty with ONLCR flag turned off and
ED> then immediately calls tcsetattr to turn it on,
ED> fhandler_pty_master::process_slave_output gets confused. it
ED> calculates rlen according to old tty settings and signals output_done
ED> event. then it process the buffer according to new tty settings, and
ED> stumbles over internal error message. Patch attached (well, this
ED> time i triple-checked that it does contain changelog entry :)
the patch is wrong, however :( it seems that pty_master cannot tell
when it got all data from slave's write() and can signal
output_done_event. How about sending
'<data_length (1 byte)><data_block (up to 255 bytes)>'
through pipe between slave and master? this would also solve
PeekNamedPipe polling problem.
Egor. mailto:deo@logos-m.ru ICQ 5165414 FidoNet 2:5020/496.19