mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-07 19:57:45 +03:00
disk_benchmark: Remove the call to umask
Calling umask and open with same permission value will result in a file with no permissions bits if the program is stopped while it is doing an IO. This will result in an error with EACCES when we try to run the benchmark with the same file name. The file needs to be manually removed before continuing the benchmark. There is no use in calling umask here, so just remove it so that interrupting the program while it is doing an IO will not result int the file with no permissions the next time we run the program.
This commit is contained in:
parent
8b56d82865
commit
14e75ed721
Notes:
sideshowbarker
2024-07-17 03:45:48 +09:00
Author: https://github.com/Panky-codes Commit: https://github.com/SerenityOS/serenity/commit/14e75ed721 Pull-request: https://github.com/SerenityOS/serenity/pull/18102
@ -68,8 +68,6 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
block_sizes = { 8192, 32768, 65536 };
|
||||
}
|
||||
|
||||
umask(0644);
|
||||
|
||||
auto filename = DeprecatedString::formatted("{}/disk_benchmark.tmp", directory);
|
||||
|
||||
for (auto file_size : file_sizes) {
|
||||
|
Loading…
Reference in New Issue
Block a user