]> Git Repo - qemu.git/blobdiff - os-posix.c
MAINTAINERS: Avoid using K: for NUMA section
[qemu.git] / os-posix.c
index cce62ed92b37ae35f45809ceda4f160e56826d7a..107fde38bfddfab87aaa98a315d89e4c5fecb0dc 100644 (file)
@@ -37,6 +37,8 @@
 #include "qemu-options.h"
 #include "qemu/rcu.h"
 #include "qemu/error-report.h"
+#include "qemu/log.h"
+#include "qemu/cutils.h"
 
 #ifdef CONFIG_LINUX
 #include <sys/prctl.h>
@@ -275,7 +277,10 @@ void os_setup_post(void)
 
         dup2(fd, 0);
         dup2(fd, 1);
-        dup2(fd, 2);
+        /* In case -D is given do not redirect stderr to /dev/null */
+        if (!qemu_logfile) {
+            dup2(fd, 2);
+        }
 
         close(fd);
 
This page took 0.023114 seconds and 4 git commands to generate.