diff options
author | Jon Turney <jon.turney@dronecode.org.uk> | 2018-05-13 18:30:18 +0100 |
---|---|---|
committer | Jon Turney <jon.turney@dronecode.org.uk> | 2018-05-13 18:30:18 +0100 |
commit | 352e8a53ef0f5ad2777b792622e52e6e80dc7bb8 (patch) | |
tree | 5cea9f1d2cc3b7cbdfd75ea9431a9fea23a0b595 /hw/xwin/winerror.c | |
parent | 82f8fc5ffc0065537896ec43ae60d67d9a164c75 (diff) | |
parent | 545b84e824c7180bb3512c6a248a7c1ebf371698 (diff) |
Merge branch 'cygwin-patches-for-1.20' into cygwin-release-1.20xserver-cygwin-1.20.0-2xserver-cygwin-1.20.0-1
Diffstat (limited to 'hw/xwin/winerror.c')
-rw-r--r-- | hw/xwin/winerror.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/hw/xwin/winerror.c b/hw/xwin/winerror.c index 784772f5f..1191d27b8 100644 --- a/hw/xwin/winerror.c +++ b/hw/xwin/winerror.c @@ -65,14 +65,20 @@ OsVendorFatalError(const char *f, va_list args) { char errormsg[1024] = ""; - /* Don't give duplicate warning if UseMsg was called */ + /* If we want to silence it, + * detect if we are going to abort due to duplication error */ + if (g_fSilentDupError) { + if ((strcmp(f, "InitOutput - Duplicate invocation on display number: %s. Exiting.\n") == 0) + || (strcmp(f, "Server is already active for display %s\n%s %s\n%s\n") == 0) + || (strcmp(f, "MakeAllCOTSServerListeners: server already running\n") == 0)) { + g_fSilentFatalError = TRUE; + } + } + + /* Don't give warning if it's been silenced */ if (g_fSilentFatalError) return; - if (!g_fLogInited) { - g_fLogInited = TRUE; - g_pszLogFile = LogInit(g_pszLogFile, ".old"); - } LogClose(EXIT_ERR_ABORT); /* Format the error message */ |