public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: gdb pty problem [Was: emacs gud-interface is not updated after gdb command execution (maybe because of incomplete output from gdb)]
Date: Mon, 06 Jun 2016 13:16:00 -0000	[thread overview]
Message-ID: <20160606131642.GA4919@calimero.vinschen.de> (raw)
In-Reply-To: <20160606191231.a60b226a9867c15023e07fb1@nifty.ne.jp>

[-- Attachment #1: Type: text/plain, Size: 1354 bytes --]

On Jun  6 19:12, Takashi Yano wrote:
> Hi Corinna,
> 
> I had looked into this problem, and found the cause.
> 
> 'man termios' says:
> "A read(2) returns at most one line of input" in canonical mode.
> 
> On cygwin 2.5.1, read(2) returns all data in buffer if the buffer
> size specified is large enough. This behaviour is correct in
> noncanonical mode, but is not correct in canonical mode.
> 
> So, I would like to propose a following patch.
> [...]
> While checking this problem, I found a bug of tcflush().
> tcflush() flushes only partial data in the buffer.
> 
> The patch above also fixes this bug.
> 
> A test case attached (pty_readlen.c) is for confirming
> the behaviour of read() and tcflush(). 
> [...]
> Of course, Ken's gdbstc works fine without sleep with this patch,
> as well as original emacs case.

Thanks a lot.  Patch applied.

I uploaded a new snapshot with this patch to https://cygwin.com/snapshots/
for quick testing.

Just one question:  In future, would you mind terribly to provide
patches in `git format-patch' format (and ideally on the cygwin-patches
mailing list)?  It's easier to handle by lazy maintainers... :)


Thanks,
Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2016-06-06 13:16 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-26 12:32 emacs gud-interface is not updated after gdb command execution (maybe because of incomplete output from gdb) Tobias Zawada
2016-05-26 15:48 ` William M. (Mike) Miller
2016-05-26 17:48 ` Ken Brown
2016-05-26 18:00   ` Tobias Zawada
2016-05-26 18:01     ` Ken Brown
2016-05-31  1:47   ` gdb pty problem [Was: emacs gud-interface is not updated after gdb command execution (maybe because of incomplete output from gdb)] Ken Brown
2016-05-31  9:35     ` Ken Brown
2016-05-31 22:41       ` Corinna Vinschen
2016-06-01 12:51         ` Ken Brown
2016-06-01 13:02           ` Ken Brown
2016-06-01 14:28             ` Corinna Vinschen
2016-06-01 14:29               ` Corinna Vinschen
2016-06-01 14:33               ` Ken Brown
2016-06-01 15:22                 ` Ken Brown
2016-06-01 18:29                   ` Corinna Vinschen
2016-06-01 19:05                     ` Ken Brown
2016-06-01 19:54                       ` Corinna Vinschen
2016-06-01 20:01                         ` Ken Brown
2016-06-01 21:05                           ` [GOLDSTAR] " Corinna Vinschen
2016-06-02  2:09                             ` Andrew Schulman
2016-06-01 14:18           ` Corinna Vinschen
2016-06-06 10:12             ` Takashi Yano
2016-06-06 13:16               ` Corinna Vinschen [this message]
2016-06-07 13:14                 ` Takashi Yano
2016-06-07 16:11                   ` Corinna Vinschen
2016-06-06 14:01               ` Ken Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160606131642.GA4919@calimero.vinschen.de \
    --to=corinna-cygwin@cygwin.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).