forked from fish-shell/fish-shell
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Flush stdout when control returns to shell
This prevents kernel-buffered stdout contents from being written to the terminal after the prompt itself, which can happen when the external process is terminated with a signal and hasn't executed the libc/runtime-provided exit handlers that flush stdout. While it is possible for a libc-less application to exit normally without flushing the stdout fd, the only way for "normal" applications to bypass the atexit handlers would be to exit via abort() (i.e. SIGABRT) or in response to some other signal; so we currently only flush stdout in response to such an exit to reduce syscall overhead.
- Loading branch information
Showing
1 changed file
with
18 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters