mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2025-07-07 00:04:57 +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
@ -1703,6 +1703,23 @@ void *UnixFileOpen(char *name, bool write_mode, bool read_lock)
|
||||
return (void *)p;
|
||||
}
|
||||
|
||||
// Get UNIXIO object for stdout
|
||||
void* GetUnixio4Stdout()
|
||||
{
|
||||
static UNIXIO unixio =
|
||||
{
|
||||
.fd = -1,
|
||||
.write_mode = true
|
||||
};
|
||||
|
||||
if (g_foreground)
|
||||
{
|
||||
unixio.fd = STDOUT_FILENO;
|
||||
return &unixio;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// Return the current thread ID
|
||||
UINT UnixThreadId()
|
||||
{
|
||||
|
Reference in New Issue
Block a user