Skip to content

Commit a0064d5

Browse files
committed
fixup! fs: improve error perf of sync chmod+fchmod
1 parent 67dab7e commit a0064d5

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

benchmark/fs/bench-fchmodSync.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ function main({ n, type }) {
3232
}
3333

3434
const fds = files.map((x) => {
35-
// Try to open, if not return invalid fd (-1)
35+
// Try to open, if not return likely invalid fd (1 << 30)
3636
try {
3737
return fs.openSync(x, 'r');
3838
} catch {
39-
return -1;
39+
return 1 << 30;
4040
}
4141
});
4242

0 commit comments

Comments
 (0)