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

Commit 256c491

Browse files
authored
Merge pull request #219 from laijs/flush-stderr
flush stderr also when exit or install new stderr
2 parents 9844779 + 6d75e8c commit 256c491

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
@@ -400,7 +400,7 @@ static int hyper_install_process_stdio(struct hyper_exec *e, struct stdio_config
400400
io->stderrfd = ptyslave;
401401
}
402402

403-
fflush(stdout);
403+
fflush(NULL);
404404

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

559559
exit:
560-
fflush(stdout);
560+
fflush(NULL);
561561
_exit(125);
562562
}
563563

0 commit comments

Comments
 (0)