Skip to content

Commit a2e9645

Browse files
dschoGit for Windows Build Agent
authored and
Git for Windows Build Agent
committed
common-main.c: fflush stdout buffer when exit (#4901)
2 parents 436a7c7 + 48083c4 commit a2e9645

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

common-exit.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@ static void check_bug_if_BUG(void)
1111
/* We wrap exit() to call common_exit() in git-compat-util.h */
1212
int common_exit(const char *file, int line, int code)
1313
{
14+
/*
15+
* Windows Filtering Platform driver provided by the security software
16+
* may change buffer type of stdout from _IONBF to _IOFBF.
17+
* It will no output without fflush manually.
18+
*/
19+
fflush(stdout);
20+
1421
/*
1522
* For non-POSIX systems: Take the lowest 8 bits of the "code"
1623
* to e.g. turn -1 into 255. On a POSIX system this is

0 commit comments

Comments
 (0)