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 b39969dcd..505552d19 100644 --- a/xorg-server/os/connection.c +++ b/xorg-server/os/connection.c @@ -380,9 +380,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 67c27eefa..d63cae882 100644 --- a/xorg-server/os/log.c +++ b/xorg-server/os/log.c @@ -497,13 +497,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); @@ -535,6 +536,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 9e5eefddb..1e25ddd53 100644 --- a/xorg-server/os/utils.c +++ b/xorg-server/os/utils.c @@ -197,6 +197,8 @@ Bool noGEExtension = FALSE; Bool CoreDump; +Bool enableIndirectGLX = TRUE; + #ifdef PANORAMIX Bool PanoramiXExtensionDisabledHack = FALSE; #endif @@ -333,7 +335,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); @@ -563,6 +566,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"); @@ -810,6 +815,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; |