| ... | @@ -266,7 +266,7 @@ pub fn createFile(self: Dir, sub_path: [:0]const u8, flags: CreateFlags) !File { | ... | @@ -266,7 +266,7 @@ pub fn createFile(self: Dir, sub_path: [:0]const u8, flags: CreateFlags) !File { |
| 266 | if (flags.truncate) oflag |= sys.O.TRUNC; | 266 | if (flags.truncate) oflag |= sys.O.TRUNC; |
| 267 | if (flags.exclusive) oflag |= sys.O.EXCL; | 267 | if (flags.exclusive) oflag |= sys.O.EXCL; |
| 268 | oflag |= sys.O.CLOEXEC; | 268 | oflag |= sys.O.CLOEXEC; |
| 269 | return .{ .fd = @enumFromInt(try sys.openat(@intFromEnum(self.fd), sub_path.ptr, oflag)) }; | 269 | return .{ .fd = @enumFromInt(try sys.openat4(@intFromEnum(self.fd), sub_path.ptr, oflag, flags.mode)) }; |
| 270 | } | 270 | } |
| 271 | | 271 | |
| 272 | pub const CreateFlags = packed struct { | 272 | pub const CreateFlags = packed struct { |