diff options
Diffstat (limited to 'xorg-server/os')
-rw-r--r-- | xorg-server/os/busfault.c | 1 | ||||
-rw-r--r-- | xorg-server/os/connection.c | 7 | ||||
-rw-r--r-- | xorg-server/os/log.c | 10 | ||||
-rw-r--r-- | xorg-server/os/utils.c | 11 |
4 files changed, 24 insertions, 5 deletions
diff --git a/xorg-server/os/busfault.c b/xorg-server/os/busfault.c index 43bb6ea8a..ac0268fd5 100644 --- a/xorg-server/os/busfault.c +++ b/xorg-server/os/busfault.c @@ -142,6 +142,7 @@ busfault_init(void) act.sa_sigaction = busfault_sigaction; act.sa_flags = SA_SIGINFO; + sigemptyset(&act.sa_mask); if (sigaction(SIGBUS, &act, &old_act) < 0) return FALSE; previous_busfault_sigaction = old_act.sa_sigaction; diff --git a/xorg-server/os/connection.c b/xorg-server/os/connection.c index e914d9d94..40d9ff39b 100644 --- a/xorg-server/os/connection.c +++ b/xorg-server/os/connection.c @@ -353,9 +353,12 @@ NotifyParentProcess(void) { #if !defined(WIN32) if (displayfd >= 0) { - write(displayfd, display, strlen(display)); - write(displayfd, "\n", 1); + if (write(displayfd, display, strlen(display)) != strlen(display)) + FatalError("Cannot write display number to fd %d\n", displayfd); + if (write(displayfd, "\n", 1) != 1) + FatalError("Cannot write display number to fd %d\n", displayfd); close(displayfd); + displayfd = -1; } if (RunFromSmartParent) { if (ParentProcess > 1) { diff --git a/xorg-server/os/log.c b/xorg-server/os/log.c index 38193eed6..a0f2a81f3 100644 --- a/xorg-server/os/log.c +++ b/xorg-server/os/log.c @@ -491,13 +491,14 @@ static void LogSWrite(int verb, const char *buf, size_t len, Bool end_line) { static Bool newline = TRUE; + int ret; if (verb < 0 || logVerbosity >= verb) - write(2, buf, len); + ret = write(2, buf, len); if (verb < 0 || logFileVerbosity >= verb) { if (inSignalContext && logFileFd >= 0) { - write(logFileFd, buf, len); + ret = write(logFileFd, buf, len); #ifndef WIN32 if (logFlush && logSync) fsync(logFileFd); @@ -529,6 +530,11 @@ LogSWrite(int verb, const char *buf, size_t len, Bool end_line) bufferPos += len; } } + + /* There's no place to log an error message if the log write + * fails... + */ + (void) ret; } void diff --git a/xorg-server/os/utils.c b/xorg-server/os/utils.c index 6e6974e89..bc5e7df4d 100644 --- a/xorg-server/os/utils.c +++ b/xorg-server/os/utils.c @@ -194,6 +194,8 @@ Bool noGEExtension = FALSE; Bool CoreDump; +Bool enableIndirectGLX = TRUE; + #ifdef PANORAMIX Bool PanoramiXExtensionDisabledHack = FALSE; #endif @@ -313,7 +315,8 @@ LockServer(void) if (lfd < 0) FatalError("Could not create lock file in %s\n", tmp); snprintf(pid_str, sizeof(pid_str), "%10ld\n", (long) getpid()); - (void) write(lfd, pid_str, 11); + if (write(lfd, pid_str, 11) != 11) + FatalError("Could not write pid to lock file in %s\n", tmp); (void) fchmod(lfd, 0444); (void) close(lfd); @@ -537,6 +540,8 @@ UseMsg(void) ErrorF("-fn string default font name\n"); ErrorF("-fp string default font path\n"); ErrorF("-help prints message with these options\n"); + ErrorF("+iglx Allow creating indirect GLX contexts (default)\n"); + ErrorF("-iglx Prohibit creating indirect GLX contexts\n"); ErrorF("-I ignore all remaining arguments\n"); #ifdef RLIMIT_DATA ErrorF("-ld int limit data space to N Kb\n"); @@ -783,6 +788,10 @@ ProcessCommandLine(int argc, char *argv[]) UseMsg(); exit(0); } + else if (strcmp(argv[i], "+iglx") == 0) + enableIndirectGLX = TRUE; + else if (strcmp(argv[i], "-iglx") == 0) + enableIndirectGLX = FALSE; else if ((skip = XkbProcessArguments(argc, argv, i)) != 0) { if (skip > 0) i += skip - 1; |