diff options
author | Evan Martin <martine@danga.com> | 2012-12-21 01:49:55 (GMT) |
---|---|---|
committer | Evan Martin <martine@danga.com> | 2012-12-21 02:01:41 (GMT) |
commit | d8d3b2f0bdee4cd3d801bcd19bf65f91fb6760e0 (patch) | |
tree | 7b0d4c84cc5577f807387b79dece393e63d90cf3 /src/subprocess-posix.cc | |
parent | be847b38264adce9a5309c6138e5c94d4785db5a (diff) | |
download | Ninja-d8d3b2f0bdee4cd3d801bcd19bf65f91fb6760e0.zip Ninja-d8d3b2f0bdee4cd3d801bcd19bf65f91fb6760e0.tar.gz Ninja-d8d3b2f0bdee4cd3d801bcd19bf65f91fb6760e0.tar.bz2 |
correctly open /dev/null in subprocesses
Fixes issue #468.
Diffstat (limited to 'src/subprocess-posix.cc')
-rw-r--r-- | src/subprocess-posix.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/subprocess-posix.cc b/src/subprocess-posix.cc index 1c47fd1..8f1a04e 100644 --- a/src/subprocess-posix.cc +++ b/src/subprocess-posix.cc @@ -76,7 +76,7 @@ bool Subprocess::Start(SubprocessSet* set, const string& command) { break; // Open /dev/null over stdin. - int devnull = open("/dev/null", O_WRONLY); + int devnull = open("/dev/null", O_RDONLY); if (devnull < 0) break; if (dup2(devnull, 0) < 0) |