Lines Matching refs:WRITE
64 constexpr int WRITE = 1;
315 dup2(fds[WRITE], STDOUT_FILENO); // Redirect stdout to pipe
316 CHECK_TRUE(CustomFdClose(fds[WRITE]) == 0, nullptr, "CustomFdClose failed!");
318 CHECK_TRUE(CustomFdClose(fds[WRITE]) == 0, nullptr, "CustomFdClose failed!");
333 // Close the WRITE end of the pipe since parent's fd is read-only
334 CHECK_TRUE(CustomFdClose(fds[WRITE]) == 0, nullptr, "%s %d CustomFdClose failed! errno(%s)\n",
350 PROFILER_LOG_DEBUG(LOG_CORE, "END %s fds[WRITE]: success!", __func__);
351 return fdopen(fds[WRITE], "w");
391 if (CustomFdClose(fds[WRITE]) != 0) {
396 } else if (fileno(fp) == fds[WRITE]) {
397 fds[WRITE] = -1;
404 PROFILER_LOG_INFO(LOG_CORE, "%s: Can't find fp in fds[READ/WRITE].", __func__);
419 CHECK_TRUE(fds[READ] != -1 && fds[WRITE] != -1, -1, "END fds[READ/WRITE]=-1");
427 write(fds[WRITE], eof, strlen(eof) + 1);