winws: enable stdout flushing when piping

This commit is contained in:
bol-van 2024-05-11 09:50:45 +03:00
parent 64ef53a737
commit d42a892828
3 changed files with 8 additions and 0 deletions

Binary file not shown.

View File

@ -417,6 +417,10 @@ static int win_main(const char *windivert_filter)
pre_desync();
// cygwin auto flush fails when piping
fflush(stdout);
fflush(stderr);
for (id=0;;id++)
{
len = sizeof(packet);
@ -465,6 +469,10 @@ static int win_main(const char *windivert_filter)
default:
DLOG("packet: id=%u drop\n", id);
}
// cygwin auto flush fails when piping
fflush(stdout);
fflush(stderr);
}
return 0;
}