Lines Matching refs:READ
63 constexpr int READ = 0;
314 CHECK_TRUE(CustomFdClose(fds[READ]) == 0, nullptr, "CustomFdClose failed!");
319 dup2(fds[READ], STDIN_FILENO); // Redirect stdin to pipe
320 CHECK_TRUE(CustomFdClose(fds[READ]) == 0, nullptr, "CustomFdClose failed!");
337 // Close the READ end of the pipe since parent's fd is write-only
338 CHECK_TRUE(CustomFdClose(fds[READ]) == 0, nullptr, "%s %d CustomFdClose failed! errno(%s)\n",
346 PROFILER_LOG_DEBUG(LOG_CORE, "END %s fds[READ]: success!", __func__);
347 return fdopen(fds[READ], "r");
389 if (fileno(fp) == fds[READ]) {
390 fds[READ] = -1;
398 if (CustomFdClose(fds[READ]) != 0) {
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");
421 int stat = fcntl(fds[READ], F_GETFL);
428 fcntl(fds[READ], F_SETFL, O_NONBLOCK);