aboutsummaryrefslogtreecommitdiff
path: root/lib/std/fs
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2020-04-27 18:26:59 -0400
committerAndrew Kelley <andrew@ziglang.org>2020-05-01 06:47:20 -0400
commit2bae94280058f23ba44dc3857e2b551f5894e1cb (patch)
tree39483fa7a609f36b58dc19524e0b4467ab473974 /lib/std/fs
parentb23a87953a7a4030af3d9acf8deacb85162dd275 (diff)
downloadzig-2bae94280058f23ba44dc3857e2b551f5894e1cb.tar.gz
zig-2bae94280058f23ba44dc3857e2b551f5894e1cb.zip
add ZIR compare output test case to test suite
Diffstat (limited to 'lib/std/fs')
-rw-r--r--lib/std/fs/file.zig10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/std/fs/file.zig b/lib/std/fs/file.zig
index 63adfc9648..aec8468bc0 100644
--- a/lib/std/fs/file.zig
+++ b/lib/std/fs/file.zig
@@ -69,6 +69,11 @@ pub const File = struct {
/// It allows the use of `noasync` when calling functions related to opening
/// the file, reading, and writing.
always_blocking: bool = false,
+
+ /// `true` means the opened directory can be passed to a child process.
+ /// `false` means the directory handle is considered to be closed when a child
+ /// process is spawned. This corresponds to the inverse of `O_CLOEXEC` on POSIX.
+ share_with_child_process: bool = false,
};
/// TODO https://github.com/ziglang/zig/issues/3802
@@ -107,6 +112,11 @@ pub const File = struct {
/// For POSIX systems this is the file system mode the file will
/// be created with.
mode: Mode = default_mode,
+
+ /// `true` means the opened directory can be passed to a child process.
+ /// `false` means the directory handle is considered to be closed when a child
+ /// process is spawned. This corresponds to the inverse of `O_CLOEXEC` on POSIX.
+ share_with_child_process: bool = false,
};
/// Upon success, the stream is in an uninitialized state. To continue using it,