From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60338) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a6eXH-0000of-S9 for qemu-devel@nongnu.org; Wed, 09 Dec 2015 08:12:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a6eXE-0008K5-Kk for qemu-devel@nongnu.org; Wed, 09 Dec 2015 08:11:59 -0500 Received: from mail-wm0-x22c.google.com ([2a00:1450:400c:c09::22c]:34866) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a6eXE-0008JL-Ei for qemu-devel@nongnu.org; Wed, 09 Dec 2015 08:11:56 -0500 Received: by wmuu63 with SMTP id u63so221707740wmu.0 for ; Wed, 09 Dec 2015 05:11:56 -0800 (PST) Sender: Paolo Bonzini References: <20151208145944.GP2999@redhat.com> <56670DB7.8050306@redhat.com> <20151209111930.GB19914@redhat.com> From: Paolo Bonzini Message-ID: <5668289C.7010206@redhat.com> Date: Wed, 9 Dec 2015 14:11:56 +0100 MIME-Version: 1.0 In-Reply-To: <20151209111930.GB19914@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] FD passing for chardevs and chardev backend multiplexing List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" , Eric Blake Cc: libvir-list@redhat.com, qemu-devel@nongnu.org On 09/12/2015 12:19, Daniel P. Berrange wrote: > > > Now in practice this doesn't work, because qmp_chardev_open_file() > > > passes the O_CREAT|O_TRUNC flags in, which means the qemu_open() > > > call will fail when using the pipe FD pased in via fdsets. > > > > Is it just the O_TRUNC that is failing? If so, there is a recent patch > > to add an 'append':true flag that switches O_TRUNC off in favor of O_APPEND: > > https://lists.gnu.org/archive/html/qemu-devel/2015-12/msg00762.html > > Yes, it is the ftruncate() call in qemu_dup_flags, called from qemu_open > that is failing. It will require a little auditing, but I think ignoring EINVAL from that fruncate() is fine. Paolo