mirror of
https://github.com/clearlinux/hyperstart.git
synced 2026-08-18 20:05:48 +00:00
flush stderr also when exit or install new stderr
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com>
This commit is contained in:
+2
-2
@@ -399,7 +399,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");
|
||||
@@ -555,7 +555,7 @@ static void hyper_exec_process(struct hyper_exec *exec, struct stdio_config *io)
|
||||
}
|
||||
|
||||
exit:
|
||||
fflush(stdout);
|
||||
fflush(NULL);
|
||||
_exit(125);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user