Merge pull request #219 from laijs/flush-stderr

flush stderr also when exit or install new stderr
This commit is contained in:
Lai Jiangshan
2016-10-18 10:32:57 +08:00
committed by GitHub
+2 -2
View File
@@ -400,7 +400,7 @@ static int hyper_install_process_stdio(struct hyper_exec *e, struct stdio_config
io->stderrfd = ptyslave;
}
fflush(stdout);
fflush(NULL);
if (dup2(io->stdinfd, STDIN_FILENO) < 0) {
perror("dup tty device to stdin failed");
@@ -557,7 +557,7 @@ static void hyper_exec_process(struct hyper_exec *exec, struct stdio_config *io)
}
exit:
fflush(stdout);
fflush(NULL);
_exit(125);
}