Re: [Qemu-devel] [PATCH 3/9] log: improve code in do_qemu_set_log

2016-03-19 Thread Paolo Bonzini
On 16/03/2016 12:20, Denis V. Lunev wrote: > The question here is the following actually. > > Should we continue to keep writing 'stderr' output to the log file > when we have cleared all log levels. If the answer is 'yes', > original == your code is correct while my is wrong. In the > other cas

Re: [Qemu-devel] [PATCH 3/9] log: improve code in do_qemu_set_log

2016-03-19 Thread Denis V. Lunev
On 03/14/2016 05:28 PM, Paolo Bonzini wrote: On 14/03/2016 12:21, Denis V. Lunev wrote: /* In case -D is given do not redirect stderr to /dev/null */ -if (!qemu_logfile) { +if (!qemu_logfile || qemu_logfile == stderr) { dup2(fd, 2); This relies on knowle

Re: [Qemu-devel] [PATCH 3/9] log: improve code in do_qemu_set_log

2016-03-14 Thread Paolo Bonzini
On 14/03/2016 12:21, Denis V. Lunev wrote: > /* In case -D is given do not redirect stderr to /dev/null */ > -if (!qemu_logfile) { > +if (!qemu_logfile || qemu_logfile == stderr) { > dup2(fd, 2); This relies on knowledge that fileno(qemu_logfile) is dup-ed t

[Qemu-devel] [PATCH 3/9] log: improve code in do_qemu_set_log

2016-03-14 Thread Denis V. Lunev
The following commit commit 96c33a4523ee1abe382ce4ff3e82b90ba78aa186 Author: Dimitris Aragiorgis Date: Thu Feb 18 13:38:38 2016 +0200 log: Redirect stderr to logfile if deamonized was created with unnecessary side effect - connect from libvirt starts to hang. This, in turn, was