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

2015-04-22 Thread Takashi Yano
Hi Corinna, On Mon, 20 Apr 2015 17:12:30 +0200 Corinna Vinschen corinna-cyg...@cygwin.com wrote: Ok. Let's go with that. Can you please rename handle2/master2 to handle_cyg/master_cyg and resend the patch to the cygwin-patches mailing list? Please find a patch attached. ChangeLog is as

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

2015-04-22 Thread Corinna Vinschen
On Apr 22 19:57, Takashi Yano wrote: Hi Corinna, On Mon, 20 Apr 2015 17:12:30 +0200 Corinna Vinschen corinna-cyg...@cygwin.com wrote: Ok. Let's go with that. Can you please rename handle2/master2 to handle_cyg/master_cyg and resend the patch to the cygwin-patches mailing list?

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

2015-04-20 Thread Takashi Yano
Hi Corinna, On Fri, 17 Apr 2015 14:10:52 +0200 Corinna Vinschen corinna-cyg...@cygwin.com wrote: @@ -868,6 +980,9 @@ fhandler_pty_slave::tcgetattr (struct termios *t) int fhandler_pty_slave::tcsetattr (int, const struct termios *t) { + DWORD n; + while (::bytes_available (n,

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

2015-04-20 Thread Corinna Vinschen
On Apr 20 20:40, Takashi Yano wrote: Hi Corinna, On Fri, 17 Apr 2015 14:10:52 +0200 Corinna Vinschen corinna-cyg...@cygwin.com wrote: @@ -868,6 +980,9 @@ fhandler_pty_slave::tcgetattr (struct termios *t) int fhandler_pty_slave::tcsetattr (int, const struct termios *t) { +

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

2015-04-17 Thread Takashi Yano
Hi Corinna, On Thu, 16 Apr 2015 11:05:33 +0200 Corinna Vinschen corinna-cyg...@cygwin.com wrote: 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

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

2015-04-17 Thread Corinna Vinschen
On Apr 17 14:10, Corinna Vinschen wrote: On Apr 17 20:27, Takashi Yano wrote: @@ -868,6 +980,9 @@ fhandler_pty_slave::tcgetattr (struct termios *t) int fhandler_pty_slave::tcsetattr (int, const struct termios *t) { + DWORD n; + while (::bytes_available (n, from_slave) n) +

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

2015-04-17 Thread Corinna Vinschen
Hi Takashi, On Apr 17 20:27, Takashi Yano wrote: Hi Corinna, On Thu, 16 Apr 2015 11:05:33 +0200 Corinna Vinschen corinna-cyg...@cygwin.com wrote: 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

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

2015-04-16 Thread Corinna Vinschen
Hi Takashi, On Apr 16 09:26, Takashi Yano wrote: Hi Corinna, On Tue, 14 Apr 2015 09:34:56 +0200 Corinna Vinschen corinna-cyg...@cygwin.com wrote: And the native client, not knowing what he's talking to, recognizes the output stream as a normal named pipe, if it's looking for that info

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

2015-04-16 Thread Corinna Vinschen
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

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

2015-04-15 Thread Takashi Yano
Hi Corinna, On Tue, 14 Apr 2015 09:34:56 +0200 Corinna Vinschen corinna-cyg...@cygwin.com wrote: And the native client, not knowing what he's talking to, recognizes the output stream as a normal named pipe, if it's looking for that info at all. Being native, it will use native Windows MSVCRT

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

2015-04-14 Thread Corinna Vinschen
Hi Takashi, On Apr 13 19:31, Takashi Yano wrote: Hi Corinna, I'm sorry for late reply. No worries. On Tue, 7 Apr 2015 11:11:13 +0200 Corinna Vinschen corinna-cyg...@cygwin.com wrote: I think we should move opost processing back to the master side. Would it be much of a problem to

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

2015-04-13 Thread Takashi Yano
Hi Corinna, I'm sorry for late reply. On Tue, 7 Apr 2015 11:11:13 +0200 Corinna Vinschen corinna-cyg...@cygwin.com wrote: I think we should move opost processing back to the master side. Would it be much of a problem to restructure your patch to do that, without re-introducing the old

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

2015-04-07 Thread Corinna Vinschen
Hi Takashi, On Apr 5 20:55, Takashi Yano wrote: Hi Corinna, On Sat, 4 Apr 2015 10:43:54 +0200 Corinna Vinschen corinna-cyg...@cygwin.com wrote: That should have been fixed by cbb9849fa76f1dbe6c66d91b68d9a10f46f1ba69. You have to rebuild Cygwin to make this change have an effect.

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

2015-04-05 Thread Takashi Yano
Hi Corinna, On Sat, 4 Apr 2015 10:43:54 +0200 Corinna Vinschen corinna-cyg...@cygwin.com wrote: That should have been fixed by cbb9849fa76f1dbe6c66d91b68d9a10f46f1ba69. You have to rebuild Cygwin to make this change have an effect. Alternatively you could checkout

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

2015-04-04 Thread Corinna Vinschen
On Apr 4 15:55, Takashi Yano wrote: Hi Corinna, On Fri, 3 Apr 2015 13:32:26 +0200 Corinna Vinschen corinna-cyg...@cygwin.com wrote: Btw., we have a regression in the latest PTY code in terms of some native Windows tools. I noticed this with `icacls': To confirm this, I tried to

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

2015-04-04 Thread Takashi Yano
Hi Corinna, On Fri, 3 Apr 2015 13:32:26 +0200 Corinna Vinschen corinna-cyg...@cygwin.com wrote: Btw., we have a regression in the latest PTY code in terms of some native Windows tools. I noticed this with `icacls': To confirm this, I tried to build latest git version. However, I have found

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

2015-04-03 Thread Corinna Vinschen
Hi Takashi, On Apr 3 13:07, Takashi Yano wrote: On Thu, 5 Mar 2015 13:59:01 +0100 Corinna Vinschen corinna-cyg...@cygwin.com wrote: One small thing to be improved is here: + if (echo_cnt 0 +ReadFile (echo_r, outbuf, MIN (rlen, echo_cnt), n, NULL)) echo_cnt

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

2015-04-02 Thread Takashi Yano
On Thu, 5 Mar 2015 13:59:01 +0100 Corinna Vinschen corinna-cyg...@cygwin.com wrote: One small thing to be improved is here: + if (echo_cnt 0 + ReadFile (echo_r, outbuf, MIN (rlen, echo_cnt), n, NULL)) echo_cnt returned by ::bytes_available() is actually not a number of

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

2015-04-02 Thread Takashi Yano
On Fri, 3 Apr 2015 13:07:35 +0900 Takashi Yano takashi.y...@nifty.ne.jp wrote: 2015-04-03 Takashi Yano takashi.y...@nifty.ne.jp * fhandler_tty.cc (fhandler_pty_slave::read): Change calculation of readlen not to use bytes_in_pype value directly. s/pype/pipe/ Sorry. --

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

2015-03-05 Thread Corinna Vinschen
On Mar 5 20:24, Takashi Yano wrote: On Wed, 4 Mar 2015 19:18:57 +0100 Corinna Vinschen corinna-cyg...@cygwin.com wrote: The result is the patch I attached to this mail. I'm not sure it's the most feasible way to solve this problem, but it works pretty nicely for me, including pasting

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

2015-03-05 Thread Takashi Yano
On Wed, 4 Mar 2015 19:18:57 +0100 Corinna Vinschen corinna-cyg...@cygwin.com wrote: The result is the patch I attached to this mail. I'm not sure it's the most feasible way to solve this problem, but it works pretty nicely for me, including pasting big chunks (I tried a clipboard with about

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

2015-03-04 Thread Corinna Vinschen
On Mar 4 19:18, Corinna Vinschen wrote: Hi Takashi, Oh, btw. I wouldn't be too unhappy if we could move the discussions about Cygwin implementation details to the cygwin-developers mailing list. The cygwin mailing list should be reserved for the more user-centric stuff, me thinks. Thanks,

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

2015-03-04 Thread Corinna Vinschen
Hi Takashi, On Mar 4 13:19, Corinna Vinschen wrote: On Mar 4 20:34, Takashi Yano wrote: On Mon, 2 Mar 2015 15:44:26 +0100 Corinna Vinschen corinna-cyg...@cygwin.com wrote: To check buffer space before WriteFile() is one idea, but it is not smart, I suppose... I think that's

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

2015-03-04 Thread Corinna Vinschen
On Mar 4 20:34, Takashi Yano wrote: On Mon, 2 Mar 2015 15:44:26 +0100 Corinna Vinschen corinna-cyg...@cygwin.com wrote: 1) Buffer of named pipe gets full-filled by a lot of data written by slave side. 2) WriteFile() in fhandler_pty_master::doecho(), which is called from master

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

2015-03-04 Thread Takashi Yano
On Mon, 2 Mar 2015 15:44:26 +0100 Corinna Vinschen corinna-cyg...@cygwin.com wrote: 1) Buffer of named pipe gets full-filled by a lot of data written by slave side. 2) WriteFile() in fhandler_pty_master::doecho(), which is called from master side by key input, is blocked because the

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

2015-03-02 Thread Corinna Vinschen
On Mar 2 15:44, Corinna Vinschen wrote: Hi Takashi, On Mar 2 20:45, Takashi Yano wrote: On Sat, 28 Feb 2015 15:02:51 +0100 Corinna Vinschen corinna-cyg...@cygwin.com wrote: Hmm, I can reproduce this even with stty -echo. The tty code is not Some shells seem to re-enable echo

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

2015-03-02 Thread Corinna Vinschen
Hi Takashi, On Mar 2 20:45, Takashi Yano wrote: On Sat, 28 Feb 2015 15:02:51 +0100 Corinna Vinschen corinna-cyg...@cygwin.com wrote: Hmm, I can reproduce this even with stty -echo. The tty code is not Some shells seem to re-enable echo when it goes back into prompt. Please put both

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

2015-03-02 Thread Takashi Yano
On Sat, 28 Feb 2015 15:02:51 +0100 Corinna Vinschen corinna-cyg...@cygwin.com wrote: Hmm, I can reproduce this even with stty -echo. The tty code is not Some shells seem to re-enable echo when it goes back into prompt. Please put both 'stty' and 'yes' in one command line, separating them with

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

2015-02-28 Thread Denis Excoffier
On 2015-02-28 06:40, Takashi Yano wrote: Package: cygwin Version: 1.7.34-6 Cygwin often hangs up if several keys are input during a lot of text outputs. To reproduce this problem: 1) Start a new cygwin session on mintty. 2) Execute yes

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

2015-02-28 Thread Corinna Vinschen
Hi Takashi, On Feb 28 14:40, Takashi Yano wrote: Package: cygwin Version: 1.7.34-6 Cygwin often hangs up if several keys are input during a lot of text outputs. To reproduce this problem: 1) Start a new cygwin session on mintty. 2) Execute yes