race in tty handling code
Egor Duda
deo@logos-m.ru
Thu Feb 22 07:56:00 GMT 2001
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
More information about the Cygwin-patches
mailing list