Make the subprocess' STDIN blocking

parent 48a33aa3
......@@ -136,6 +136,7 @@ subproc(char * const *argv, char * const envp[], int *writefd, int *readfd)
closef(pin[STDOUT_FILENO]);
closef(pout[STDIN_FILENO]);
closef(pout[STDOUT_FILENO]);
blockf(STDIN_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