[PATCH 05/10] Fix bug in setting up child stderr/out with /dev/null

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Daniel P. Berrange <berrange@xxxxxxxxxx>

---
 src/util/util.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/util/util.c b/src/util/util.c
index 2d6485f..f2fe58a 100644
--- a/src/util/util.c
+++ b/src/util/util.c
@@ -463,7 +463,7 @@ __virExec(const char *const*argv,
     int childerr = -1;
     int tmpfd;

-    if ((null = open("/dev/null", O_RDONLY)) < 0) {
+    if ((null = open("/dev/null", O_RDWR)) < 0) {
         virReportSystemError(errno,
                              _("cannot open %s"),
                              "/dev/null");
-- 
1.7.3.2

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]