| ... | @@ -70,7 +70,9 @@ pub fn mktemp(flags: Dir.CreateFlags) !File { | ... | @@ -70,7 +70,9 @@ pub fn mktemp(flags: Dir.CreateFlags) !File { |
| 70 | const rand = nio.randomBytes(10); | 70 | const rand = nio.randomBytes(10); |
| 71 | for (template[9..][0..10], rand) |*a, b| a.* = letters[b % 62]; | 71 | for (template[9..][0..10], rand) |*a, b| a.* = letters[b % 62]; |
| 72 | const path = template[0 .. template.len - 1 :0]; | 72 | const path = template[0 .. template.len - 1 :0]; |
| 73 | return cwd().createFile(path, flags); | 73 | var _flags = flags; |
| | 74 | _flags.exclusive = true; |
| | 75 | return cwd().createFile(path, _flags); |
| 74 | } | 76 | } |
| 75 | | 77 | |
| 76 | pub fn pipe2(flag: c_int) ![2]File { | 78 | pub fn pipe2(flag: c_int) ![2]File { |