Commit 159f0e04 authored by jaekyun's avatar jaekyun Committed by Commit bot

Create non-blocked fifo

On average it takes about 459 ms to create a FIFO file for logging. This delay isn't small compared to the average running time (1354 ms) of a single testcase on native.

The delay is because currently creating the FIFO file is blocked until the other end is opened also.

So changing it to non-blocking will save the amount of time.

BUG=449354

Review URL: https://codereview.chromium.org/1003073002

Cr-Commit-Position: refs/heads/master@{#320847}
parent cc936a29
......@@ -87,7 +87,7 @@ static void RunTests(JNIEnv* env,
base::android::ConvertJavaStringToUTF8(env, jfiles_dir));
base::FilePath fifo_path(files_dir.Append(base::FilePath("test.fifo")));
base::android::CreateFIFO(fifo_path, 0666);
base::android::RedirectStream(stdout, fifo_path, "w");
base::android::RedirectStream(stdout, fifo_path, "w+");
dup2(STDOUT_FILENO, STDERR_FILENO);
ScopedMainEntryLogger scoped_main_entry_logger;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment