This is the mail archive of the cygwin-patches@sources.redhat.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: race in tty handling code


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]