mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Disable stdout/err buffering on Windows for assignment client and domain server
This commit is contained in:
parent
cd46a55369
commit
b75c3a4976
2 changed files with 22 additions and 0 deletions
|
@ -37,6 +37,17 @@ AssignmentClient::AssignmentClient(int &argc, char **argv) :
|
|||
QCoreApplication(argc, argv),
|
||||
_assignmentServerHostname(DEFAULT_ASSIGNMENT_SERVER_HOSTNAME)
|
||||
{
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
// Windows applications buffer stdout/err hard when not run from a terminal,
|
||||
// making assignment clients run from the Stack Manager application not flush
|
||||
// log messages.
|
||||
// This will disable the buffering. If this becomes a performance issue,
|
||||
// an alternative is to call fflush(...) periodically.
|
||||
setbuf(stdout, NULL);
|
||||
setbuf(stderr, NULL);
|
||||
#endif
|
||||
|
||||
setOrganizationName("High Fidelity");
|
||||
setOrganizationDomain("highfidelity.io");
|
||||
setApplicationName("assignment-client");
|
||||
|
|
|
@ -43,6 +43,17 @@ DomainServer::DomainServer(int argc, char* argv[]) :
|
|||
_networkReplyUUIDMap(),
|
||||
_sessionAuthenticationHash()
|
||||
{
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
// Windows applications buffer stdout/err hard when not run from a terminal,
|
||||
// making a domain server run from the Stack Manager application not flush
|
||||
// log messages.
|
||||
// This will disable the buffering. If this becomes a performance issue,
|
||||
// an alternative is to call fflush(...) periodically.
|
||||
setbuf(stdout, NULL);
|
||||
setbuf(stderr, NULL);
|
||||
#endif
|
||||
|
||||
setOrganizationName("High Fidelity");
|
||||
setOrganizationDomain("highfidelity.io");
|
||||
setApplicationName("domain-server");
|
||||
|
|
Loading…
Reference in a new issue