Skip to content

Commit 17e1a79

Browse files
committed
common-main.c: fflush stdout buffer when exit
1 parent ad0bbff commit 17e1a79

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

common-main.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,5 +86,10 @@ int common_exit(const char *file, int line, int code)
8686
check_bug_if_BUG();
8787
trace2_cmd_exit_fl(file, line, code);
8888

89+
/**
90+
* Some software (such as security software) may change buffer type of stdout.
91+
* It will no output without fflush manually.
92+
*/
93+
fflush(stdout);
8994
return code;
9095
}

0 commit comments

Comments
 (0)