From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:37155) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TK7GT-0000Af-5h for qemu-devel@nongnu.org; Fri, 05 Oct 2012 08:44:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TK7GP-0007FO-BT for qemu-devel@nongnu.org; Fri, 05 Oct 2012 08:44:25 -0400 Received: from mail-pa0-f45.google.com ([209.85.220.45]:39022) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TK7GP-0007ER-5L for qemu-devel@nongnu.org; Fri, 05 Oct 2012 08:44:21 -0400 Received: by mail-pa0-f45.google.com with SMTP id fb10so1710943pad.4 for ; Fri, 05 Oct 2012 05:44:20 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <506ED61D.3030305@redhat.com> Date: Fri, 05 Oct 2012 14:44:13 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1349275025-5093-1-git-send-email-pbonzini@redhat.com> <1349275025-5093-9-git-send-email-pbonzini@redhat.com> <20121004152435.475f879a@doriath.home> <506E7D6A.3040206@redhat.com> <20121005094105.60818a32@doriath.home> In-Reply-To: <20121005094105.60818a32@doriath.home> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 08/18] migration (outgoing): add error propagation for fd and exec protocols List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino Cc: qemu-devel Il 05/10/2012 14:41, Luiz Capitulino ha scritto: >>> > > That DPRINTF() usage is really bizarre, it seems its purpose is to report >>> > > an error to the user, but that's a debugging call. >>> > > >>> > > I'd let it there and replace it later with proper tracing code, but that's >>> > > quite minor for me. Please, at least mention you're dropping it in the log. >> > >> > This one is not dropped, it becomes the reported error message. > What I meant is that the error/debug message won't be printed the same way > it was before. This is an improvement, but it's a good idea to mention it. > I mentioned it for fd, but the popen() function only returns NULL if the fork(2) or pipe(2) calls fail, or if it cannot allocate memory, so I have no idea how to trigger it. >> It would also fix the clobbering of errno. > > I guess so. Is it possible for popen() to return success but then set the > FILE's fd to -1? No. I will add the assert(). Paolo