qemu-trivial
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-trivial] [Qemu-devel] [PATCH 1/1] Do not hang on full PTY


From: Don Slutz
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH 1/1] Do not hang on full PTY
Date: Tue, 30 Dec 2014 20:56:52 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7

On 12/29/14 18:41, Peter Maydell wrote:
On 29 December 2014 at 20:27, Don Slutz <address@hidden> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]