Make the subprocess' STDOUT blocking

parent 3cf56ffc
......@@ -137,6 +137,7 @@ subproc(char * const *argv, char * const envp[], int *writefd, int *readfd)
closef(pout[STDIN_FILENO]);
closef(pout[STDOUT_FILENO]);
blockf(STDIN_FILENO);
blockf(STDOUT_FILENO);
if (execve(argv[0], argv, envp) == -1)
pexit("execve(argv)");
}
......
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