From: Don Slutz <dslutz@verizon.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: QEMU Trivial <qemu-trivial@nongnu.org>,
Michael Tokarev <mjt@tls.msk.ru>,
QEMU Developers <qemu-devel@nongnu.org>,
Don Slutz <dslutz@verizon.com>,
Anthony Liguori <aliguori@amazon.com>,
Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH 1/1] Do not hang on full PTY
Date: Tue, 30 Dec 2014 20:56:52 -0500 [thread overview]
Message-ID: <54A357E4.6080103@terremark.com> (raw)
In-Reply-To: <CAFEAcA-GjRku9rRZr04itDx-bB40=DpdLNf9_V8QfHANiit4GA@mail.gmail.com>
On 12/29/14 18: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?
The only time I know of to get here in that state, is when the other end
disconnects.
Normally pty_chr_read will only be called when there is at least 1
character to read or
a state change.
> 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.
Yes, that is correct. But it only happens when the other end disconnects.
pty_chr_timer() also is involved here, so on a reconnect, the polling is
re-enabled.
-Don Slutz
>
> thanks
> -- PMM
WARNING: multiple messages have this Message-ID (diff)
From: Don Slutz <dslutz@verizon.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: QEMU Trivial <qemu-trivial@nongnu.org>,
Michael Tokarev <mjt@tls.msk.ru>,
QEMU Developers <qemu-devel@nongnu.org>,
Don Slutz <dslutz@verizon.com>,
Anthony Liguori <aliguori@amazon.com>,
Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] [Qemu-trivial] [PATCH 1/1] Do not hang on full PTY
Date: Tue, 30 Dec 2014 20:56:52 -0500 [thread overview]
Message-ID: <54A357E4.6080103@terremark.com> (raw)
In-Reply-To: <CAFEAcA-GjRku9rRZr04itDx-bB40=DpdLNf9_V8QfHANiit4GA@mail.gmail.com>
On 12/29/14 18: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?
The only time I know of to get here in that state, is when the other end
disconnects.
Normally pty_chr_read will only be called when there is at least 1
character to read or
a state change.
> 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.
Yes, that is correct. But it only happens when the other end disconnects.
pty_chr_timer() also is involved here, so on a reconnect, the polling is
re-enabled.
-Don Slutz
>
> thanks
> -- PMM
next prev parent reply other threads:[~2014-12-31 1:57 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 ` Don Slutz [this message]
2014-12-31 1:56 ` Don Slutz
2015-01-07 6:02 ` Paolo Bonzini
2015-01-07 6:02 ` [Qemu-devel] " 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=54A357E4.6080103@terremark.com \
--to=dslutz@verizon.com \
--cc=aliguori@amazon.com \
--cc=mjt@tls.msk.ru \
--cc=pbonzini@redhat.com \
--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.