[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] qemu-char: Fix missed data on unix socket
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH] qemu-char: Fix missed data on unix socket |
Date: |
Mon, 13 Jul 2015 12:15:22 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.0.1 |
On 13/07/2015 10:13, address@hidden wrote:
> Commit 812c1057 introduced HUP detection on unix and tcp sockets prior
> to a read in tcp_chr_read. This unfortunately broke CloudStack 4.2
> which relied on the old behaviour where data on a socket was readable
> even if a HUP was present.
>
> On Linux a working solution seems to be to simply check the HUP after
> reading available data, while keeping the original behaviour for windows.
>
> There is then a divergence in behaviour for the two platforms, but this
> seems better than breaking a whole software stack.
There is no need to do something special on Windows, I think. You can
unconditionally check G_IO_HUP after reading. One nit:
> - if (size == 0) {
> + if (size == 0 || (size < 0 && cond & G_IO_HUP)) {
Please put (cond & G_IO_HUP) within parentheses.
Please
- [Qemu-devel] [PATCH] qemu-char: Fix missed data on unix socket, pyssling, 2015/07/13
- Re: [Qemu-devel] [PATCH] qemu-char: Fix missed data on unix socket,
Paolo Bonzini <=
- Re: [Qemu-devel] [PATCH] qemu-char: Fix missed data on unix socket, Amit Shah, 2015/07/13
- Re: [Qemu-devel] [PATCH] qemu-char: Fix missed data on unix socket, Nils Carlson, 2015/07/13
- Re: [Qemu-devel] [PATCH] qemu-char: Fix missed data on unix socket, Nils Carlson, 2015/07/15
- Re: [Qemu-devel] [PATCH] qemu-char: Fix missed data on unix socket, Amit Shah, 2015/07/16
- Re: [Qemu-devel] [PATCH] qemu-char: Fix missed data on unix socket, Nils Carlson, 2015/07/16
- Re: [Qemu-devel] [PATCH] qemu-char: Fix missed data on unix socket, Amit Shah, 2015/07/16