diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2020-04-27 18:26:59 -0400 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2020-05-01 06:47:20 -0400 |
| commit | 2bae94280058f23ba44dc3857e2b551f5894e1cb (patch) | |
| tree | 39483fa7a609f36b58dc19524e0b4467ab473974 /lib/std/fs | |
| parent | b23a87953a7a4030af3d9acf8deacb85162dd275 (diff) | |
| download | zig-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.zig | 10 |
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, |
