From: Paolo Bonzini <pbonzini@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>, Don Slutz <dslutz@verizon.com>
Cc: QEMU Trivial <qemu-trivial@nongnu.org>,
Michael Tokarev <mjt@tls.msk.ru>,
QEMU Developers <qemu-devel@nongnu.org>,
Anthony Liguori <aliguori@amazon.com>
Subject: Re: [Qemu-trivial] [PATCH 1/1] Do not hang on full PTY
Date: Wed, 07 Jan 2015 07:02:30 +0100 [thread overview]
Message-ID: <54ACCBF6.6060408@redhat.com> (raw)
In-Reply-To: <CAFEAcA-GjRku9rRZr04itDx-bB40=DpdLNf9_V8QfHANiit4GA@mail.gmail.com>
On 30/12/2014 00:41, Peter Maydell wrote:
> On 29 December 2014 at 20:27, Don Slutz <dslutz@verizon.com> wrote:
>> I was not sure on this being trivial also, but it looked like it could
>> be to me. The uses of this FD all looked that they handle non-blocking.
>
> Does g_io_channel_read_chars() definitely return G_IO_STATUS_NORMAL
> (and not, say, G_IO_STATUS_AGAIN) for an attempted read on a non-blocking
> fd with no data?
It should return G_IO_STATUS_AGAIN. However, pty_chr_read() won't be
called in the first place because the fd won't be readable and thus the
chr->fd_in_tag GSource won't fire.
I think things more or less work right now just because PTYs are
buffered in the kernel and there's no network involved, but Don's patch
is good.
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Michael, let me know if you're applying it yourself.
Paolo
> Otherwise pty_chr_read() is going to call
> pty_chr_state(chr, 0) which I think means "the other end has hung up"
> and will take the fd out of the main loop's poll set.
>
> thanks
> -- PMM
>
>
WARNING: multiple messages have this Message-ID (diff)
From: Paolo Bonzini <pbonzini@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>, Don Slutz <dslutz@verizon.com>
Cc: QEMU Trivial <qemu-trivial@nongnu.org>,
Michael Tokarev <mjt@tls.msk.ru>,
QEMU Developers <qemu-devel@nongnu.org>,
Anthony Liguori <aliguori@amazon.com>
Subject: Re: [Qemu-devel] [Qemu-trivial] [PATCH 1/1] Do not hang on full PTY
Date: Wed, 07 Jan 2015 07:02:30 +0100 [thread overview]
Message-ID: <54ACCBF6.6060408@redhat.com> (raw)
In-Reply-To: <CAFEAcA-GjRku9rRZr04itDx-bB40=DpdLNf9_V8QfHANiit4GA@mail.gmail.com>
On 30/12/2014 00:41, Peter Maydell wrote:
> On 29 December 2014 at 20:27, Don Slutz <dslutz@verizon.com> wrote:
>> I was not sure on this being trivial also, but it looked like it could
>> be to me. The uses of this FD all looked that they handle non-blocking.
>
> Does g_io_channel_read_chars() definitely return G_IO_STATUS_NORMAL
> (and not, say, G_IO_STATUS_AGAIN) for an attempted read on a non-blocking
> fd with no data?
It should return G_IO_STATUS_AGAIN. However, pty_chr_read() won't be
called in the first place because the fd won't be readable and thus the
chr->fd_in_tag GSource won't fire.
I think things more or less work right now just because PTYs are
buffered in the kernel and there's no network involved, but Don's patch
is good.
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Michael, let me know if you're applying it yourself.
Paolo
> Otherwise pty_chr_read() is going to call
> pty_chr_state(chr, 0) which I think means "the other end has hung up"
> and will take the fd out of the main loop's poll set.
>
> thanks
> -- PMM
>
>
next prev parent reply other threads:[~2015-01-07 6:02 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-22 15:04 [Qemu-trivial] [PATCH 1/1] Do not hang on full PTY Don Slutz
2014-12-22 15:04 ` [Qemu-devel] " Don Slutz
2014-12-29 9:59 ` [Qemu-trivial] " Michael Tokarev
2014-12-29 9:59 ` [Qemu-devel] " Michael Tokarev
2014-12-29 20:27 ` Don Slutz
2014-12-29 20:27 ` [Qemu-devel] " Don Slutz
2014-12-29 23:41 ` [Qemu-trivial] [Qemu-devel] " Peter Maydell
2014-12-29 23:41 ` [Qemu-devel] [Qemu-trivial] " Peter Maydell
2014-12-31 1:56 ` [Qemu-trivial] [Qemu-devel] " Don Slutz
2014-12-31 1:56 ` [Qemu-devel] [Qemu-trivial] " Don Slutz
2015-01-07 6:02 ` Paolo Bonzini [this message]
2015-01-07 6:02 ` Paolo Bonzini
2015-01-12 8:56 ` Michael Tokarev
2015-01-12 8:56 ` [Qemu-devel] " Michael Tokarev
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=54ACCBF6.6060408@redhat.com \
--to=pbonzini@redhat.com \
--cc=aliguori@amazon.com \
--cc=dslutz@verizon.com \
--cc=mjt@tls.msk.ru \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.