mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2025-12-04 17:21:31 +03:00
UNIX services write logs to stdout
To better adopt SoftEther VPN for execution in Docker container all services output logs to stdout if running in foreground.
This commit is contained in:
committed by
Joshua Perry
parent
825931e11c
commit
02da8079ee
@ -133,6 +133,7 @@ BOOL kernel_status_inited = false; // Kernel state initialization flag
|
||||
bool g_little_endian = true;
|
||||
char *cmdline = NULL; // Command line
|
||||
wchar_t *uni_cmdline = NULL; // Unicode command line
|
||||
bool g_foreground = false; // Execute service in foreground mode
|
||||
|
||||
// Static variable
|
||||
static char *exename = NULL; // EXE file name (ANSI)
|
||||
@ -512,6 +513,7 @@ void InitMayaqua(bool memcheck, bool debug, int argc, char **argv)
|
||||
// Fail this for some reason when this is called this in .NET mode
|
||||
setbuf(stdout, NULL);
|
||||
}
|
||||
g_foreground = (argc >= 3 && StrCmpi(argv[2], UNIX_SVC_ARG_FOREGROUND) == 0);
|
||||
|
||||
// Acquisition whether NT
|
||||
#ifdef OS_WIN32
|
||||
|
||||
Reference in New Issue
Block a user