1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2024-09-19 18:20:40 +03:00

Set unbuffered mode for *nix systems stdout, allowing interactive use within spawned processes. Fixes issue #898

This commit is contained in:
MatAtBread 2019-04-07 19:13:18 +01:00
parent afa93c8b84
commit 6dbcda6026

View File

@ -35,6 +35,9 @@ int main(int argc, char *argv[])
#ifdef OS_WIN32 #ifdef OS_WIN32
SetConsoleTitleA(CEDAR_PRODUCT_STR " VPN Command Line Utility"); SetConsoleTitleA(CEDAR_PRODUCT_STR " VPN Command Line Utility");
#else
// For *nix, disable output buffering to allow for interactive use
setbuf(stdout,NULL);
#endif // OS_WIN32 #endif // OS_WIN32
#if defined(_DEBUG) || defined(DEBUG) // In VC++ compilers, the macro is "_DEBUG", not "DEBUG". #if defined(_DEBUG) || defined(DEBUG) // In VC++ compilers, the macro is "_DEBUG", not "DEBUG".