From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:55363) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RMGMV-0002pj-M2 for qemu-devel@nongnu.org; Fri, 04 Nov 2011 05:47:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RMGMU-0007hd-Oj for qemu-devel@nongnu.org; Fri, 04 Nov 2011 05:46:59 -0400 Received: from mail-gx0-f173.google.com ([209.85.161.173]:52585) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RMGMU-0007hY-Kq for qemu-devel@nongnu.org; Fri, 04 Nov 2011 05:46:58 -0400 Received: by ggnr5 with SMTP id r5so2694892ggn.4 for ; Fri, 04 Nov 2011 02:46:58 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <4EB3B48D.706@redhat.com> Date: Fri, 04 Nov 2011 10:46:53 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1319797077-25441-1-git-send-email-pbonzini@redhat.com> <1319797077-25441-5-git-send-email-pbonzini@redhat.com> <67C69C1A-BA12-4DD6-8CFE-F97011B68258@irisa.fr> <4EAA98B4.4030800@redhat.com> <90216E5F-CF18-4A44-BBCF-0DFB68259296@irisa.fr> <4EAA9D65.1080108@redhat.com> In-Reply-To: <4EAA9D65.1080108@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 4/4] qemu-nbd: do not start the block layer in the parent List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Pierre Riteau On 10/28/2011 02:17 PM, Paolo Bonzini wrote: >> Yes, it would be better if we could have error output on stderr. Now, >> "simple" errors such as a missing image file (or wrong path to the >> image) are reported to syslog instead. It could be the source of some >> headaches... >> >> Is there a way we could have the child send the error to the parent >> over a pipe and have the parent print it on stderr? > > A way could be to change the fork() into a separate thread, so that you > can daemonize as soon as you accept the socket rather than having to do > it early. I tried implementing this, but in general daemonization (which forks and leave only the children) breaks the threading. So we could either keep this series (which moves all errors to syslog, but doesn't otherwise change behavior), or I can finish and post an alternative series that removes all forking from qemu-nbd *but* changes behavior in that "qemu-nbd -c" will not daemonize anymore. Since this is 1.0 after all, I'm slightly more inclined towards the latter. Opinions? Kevin, Anthony? Paolo