aboutsummaryrefslogtreecommitdiff
path: root/lib/std/child_process.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2020-08-31 15:49:44 -0700
committerAndrew Kelley <andrew@ziglang.org>2020-08-31 15:49:44 -0700
commitc354f074fa91d3d1672469ba4bbc49a1730e1d01 (patch)
treea48c93c1d19c38ec49d5f3b6412d265a58e4f0b5 /lib/std/child_process.zig
parent4971400bdcc810766da15c63e3e57a59e49499ca (diff)
parent26140678a5c72604f2baac3cb9d1e5f7b37b6b8d (diff)
downloadzig-c354f074fa91d3d1672469ba4bbc49a1730e1d01.tar.gz
zig-c354f074fa91d3d1672469ba4bbc49a1730e1d01.zip
Merge remote-tracking branch 'origin/master' into llvm11
Diffstat (limited to 'lib/std/child_process.zig')
-rw-r--r--lib/std/child_process.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/std/child_process.zig b/lib/std/child_process.zig
index 3254b958b7..287fc3e7cd 100644
--- a/lib/std/child_process.zig
+++ b/lib/std/child_process.zig
@@ -396,12 +396,12 @@ pub const ChildProcess = struct {
// and execve from the child process to the parent process.
const err_pipe = blk: {
if (builtin.os.tag == .linux) {
- const fd = try os.eventfd(0, 0);
+ const fd = try os.eventfd(0, os.EFD_CLOEXEC);
// There's no distinction between the readable and the writeable
// end with eventfd
break :blk [2]os.fd_t{ fd, fd };
} else {
- break :blk try os.pipe();
+ break :blk try os.pipe2(os.O_CLOEXEC);
}
};
errdefer destroyPipe(err_pipe);