From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40604) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X1ap0-0005qe-S2 for qemu-devel@nongnu.org; Mon, 30 Jun 2014 08:36:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X1aot-0001w1-CA for qemu-devel@nongnu.org; Mon, 30 Jun 2014 08:36:34 -0400 Received: from mx1.redhat.com ([209.132.183.28]:61382) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X1aot-0001vw-3O for qemu-devel@nongnu.org; Mon, 30 Jun 2014 08:36:27 -0400 Message-ID: <53B159C1.7020909@redhat.com> Date: Mon, 30 Jun 2014 14:36:17 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1403297751-10379-1-git-send-email-peter.maydell@linaro.org> <87fviviydy.fsf@blackfin.pond.sub.org> <1404123796.24066.18.camel@nilsson.home.kraxel.org> <1404125874.24066.20.camel@nilsson.home.kraxel.org> <53B15814.5070106@redhat.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] qemu-char: Convert socket char backend to parse/kind List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Patch Tracking , Markus Armbruster , QEMU Developers , Michael Roth , Gerd Hoffmann , Anthony Liguori , Luiz Capitulino Il 30/06/2014 14:33, Peter Maydell ha scritto: >> > >> > It's unnecessary. tcp_chr_accept calls tcp_chr_add_client, which takes care >> > of that. But it doesn't hurt either. > I think the tcp_chr_accept->tcp_chr_add_client->set_nonblock > is marking the new fd returned from accept() as nonblocking. > The call in qemu_chr_open_socket_fd() is marking the listening > fd as nonblocking. So those are different things... Uh, you're right. I think the call in qemu_chr_open_socket_fd simply means "after the currently connected disconnects, subsequent accepts will be done via select(), so the socket can now be marked as non-blocking". The qemu-char logic is right then. Paolo