From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36274) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aaiwm-0004nh-NU for qemu-devel@nongnu.org; Tue, 01 Mar 2016 06:58:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aaiwk-0001nh-0a for qemu-devel@nongnu.org; Tue, 01 Mar 2016 06:58:36 -0500 Received: from e06smtp13.uk.ibm.com ([195.75.94.109]:33452) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aaiwj-0001nT-MX for qemu-devel@nongnu.org; Tue, 01 Mar 2016 06:58:33 -0500 Received: from localhost by e06smtp13.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 1 Mar 2016 11:58:32 -0000 Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id 7F47617D805A for ; Tue, 1 Mar 2016 11:58:53 +0000 (GMT) Received: from d06av01.portsmouth.uk.ibm.com (d06av01.portsmouth.uk.ibm.com [9.149.37.212]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u21BwSKv20971574 for ; Tue, 1 Mar 2016 11:58:28 GMT Received: from d06av01.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av01.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u21BwRaX015505 for ; Tue, 1 Mar 2016 04:58:27 -0700 Date: Tue, 1 Mar 2016 12:58:26 +0100 From: Cornelia Huck Message-ID: <20160301125826.60f65312.cornelia.huck@de.ibm.com> In-Reply-To: <1456833053-8896-1-git-send-email-pbonzini@redhat.com> References: <1456833053-8896-1-git-send-email-pbonzini@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] log: do not log if QEMU is daemonized but without -D List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: jtomko@redhat.com, qemu-devel@nongnu.org, kraxel@redhat.com On Tue, 1 Mar 2016 12:50:53 +0100 Paolo Bonzini wrote: > Commit 96c33a4 ("log: Redirect stderr to logfile if deamonized", > 2016-02-22) wanted to move stderr of a daemonized QEMU to the file > specified with -D. > > However, if -D was not passed, the patch had the side effect of not > redirecting stderr to /dev/null. This happened because qemu_logfile > was set to stderr rather than the expected value of NULL. The fix > is simply in the "if" condition of do_qemu_set_log; the "if" for > closing the file is also changed to match. > > Reported-by: Jan Tomko > Signed-off-by: Paolo Bonzini > --- > util/log.c | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) This fixes running qemu under libvirt for me. Tested-by: Cornelia Huck