Skip to content
This repository was archived by the owner on Feb 8, 2021. It is now read-only.

Commit 6d75e8c

Browse files
committed
flush stderr also when exit or install new stderr
Signed-off-by: Lai Jiangshan <[email protected]>
1 parent fcc968a commit 6d75e8c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/exec.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ static int hyper_install_process_stdio(struct hyper_exec *e, struct stdio_config
399399
io->stderrfd = ptyslave;
400400
}
401401

402-
fflush(stdout);
402+
fflush(NULL);
403403

404404
if (dup2(io->stdinfd, STDIN_FILENO) < 0) {
405405
perror("dup tty device to stdin failed");
@@ -555,7 +555,7 @@ static void hyper_exec_process(struct hyper_exec *exec, struct stdio_config *io)
555555
}
556556

557557
exit:
558-
fflush(stdout);
558+
fflush(NULL);
559559
_exit(125);
560560
}
561561

0 commit comments

Comments
 (0)