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:
Pankaj Raghav 2023-03-30 14:06:19 +02:00 committed by Andreas Kling
parent 8b56d82865
commit 14e75ed721
Notes: sideshowbarker 2024-07-17 03:45:48 +09:00

View File

@ -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) {