Cygwin hangs up if several keys are typed during outputting a lot of texts.

Corinna Vinschen corinna-cygwin@cygwin.com
Thu Apr 16 09:10:00 GMT 2015


On Apr 16 11:05, Corinna Vinschen wrote:
> Hi Takashi,
> 
> On Apr 16 09:26, Takashi Yano wrote:
> > So OPOST processing should be in master side for native windows program.
> > However, to solve the second problem I had pointed out in
> > http://cygwin.com/ml/cygwin/2015-02/msg00929.html ,
> > OPOST processing should be done on a timing when slave calls write().
> > 
> > To solve this antinomy, I have made a patch attached.
> > 
> > With this patch, new pipe is introduced to handle OPSOT-process separately
> > between native windows program and cygwin program.
> > 
> > Data from cygwin program is passed through the pipe newly introduced.
> > In this case, process_opost_output() is called in fhandler_pty_slave::write().
> > Master reads data, which is already applied OPOST process, from the
> > new pipe.
> > 
> > On the other hands, for native windows program, data is written into
> > conventional pipe. Master forwarding thread, which is also newly
> > introduced, reads conventional pipe and forward the data to the pipe
> > newly introduced by calling process_opost_output(). This makes OPOST
> > processing be done in master side.
> > 
> > I have confirmed that the both problem is fixed with this patch.
> 
> Ok, but... this is a really big patch and it complicates the pty code
> even more.  Is there really no other option as far as the TCSADRAIN
> problem is concerned?
> 
> What strikes me as weird is that neither fhandler_pty_slave::tcsetattr
> nor fhandler_pty_master::tcsetattr give a damn for the optional_actions
> parameter.  They simply overwrite the tc settings.  So I'm wondering,
> wouldn't it be possible to add code to the tcsetattr implementation
> instead, so that TCSADRAIN/TCSAFLUSH are honored and than only have one
> place for OPOST handling?

...and additionally don't have to maintain yet another handle.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20150416/757f2262/attachment.sig>


More information about the Cygwin mailing list