virExec: fix bug in setting up child stderr/out with /dev/null

This commit is contained in:
Daniel P. Berrange 2010-05-25 12:14:25 +01:00 committed by Eric Blake
parent aca20efbf8
commit dec720aa93
1 changed files with 1 additions and 1 deletions

View File

@ -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");