git/common-main.c
MinarKotonoha 12bc2c619c common-main.c: fflush stdout buffer upon exit
By default, the buffer type of Windows' `stdout` is unbuffered (_IONBF),
and there is no need to manually fflush `stdout`.

But some programs, such as the Windows Filtering Platform driver
provided by the security software, may change the buffer type of
`stdout` to full buffering. This nees `fflush(stdout)` to be called
manually, otherwise there will be no output to `stdout`.

Signed-off-by: MinarKotonoha <chengzhuo5@qq.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2025-02-06 19:32:58 +01:00

14 lines
236 B
C

#include "git-compat-util.h"
#include "common-init.h"
int main(int argc, const char **argv)
{
int result;
init_git(argv);
result = cmd_main(argc, argv);
/* Not exit(3), but a wrapper calling our common_exit() */
exit(result);
}