diff options
author | marha <marha@users.sourceforge.net> | 2012-08-07 07:51:02 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-08-07 07:51:02 +0200 |
commit | f8e35ebbe71eed74ccf68af8ccda4182f1edc7f0 (patch) | |
tree | 0451299b4aaaaf6d2423d1faf07dc9f35c9f80d8 /xorg-server/os/utils.c | |
parent | 18e75aa6ae27a6e44d93babd96afbbe0cd6077c8 (diff) | |
download | vcxsrv-f8e35ebbe71eed74ccf68af8ccda4182f1edc7f0.tar.gz vcxsrv-f8e35ebbe71eed74ccf68af8ccda4182f1edc7f0.tar.bz2 vcxsrv-f8e35ebbe71eed74ccf68af8ccda4182f1edc7f0.zip |
mesa xserver xkeyboard-config git update 7 Aug 2012
Diffstat (limited to 'xorg-server/os/utils.c')
-rw-r--r-- | xorg-server/os/utils.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/xorg-server/os/utils.c b/xorg-server/os/utils.c index d902523be..947f8673a 100644 --- a/xorg-server/os/utils.c +++ b/xorg-server/os/utils.c @@ -1186,6 +1186,7 @@ OsBlockSignals(void) #ifdef SIG_BLOCK static sig_atomic_t sigio_blocked; +static sigset_t PreviousSigIOMask; #endif /** @@ -1198,13 +1199,13 @@ OsBlockSIGIO(void) #ifdef SIGIO #ifdef SIG_BLOCK if (sigio_blocked++ == 0) { - sigset_t set, old; + sigset_t set; int ret; sigemptyset(&set); sigaddset(&set, SIGIO); - sigprocmask(SIG_BLOCK, &set, &old); - ret = sigismember(&old, SIGIO); + sigprocmask(SIG_BLOCK, &set, &PreviousSigIOMask); + ret = sigismember(&PreviousSigIOMask, SIGIO); return ret; } else return 1; @@ -1218,11 +1219,7 @@ OsReleaseSIGIO(void) #ifdef SIGIO #ifdef SIG_BLOCK if (--sigio_blocked == 0) { - sigset_t set; - - sigemptyset(&set); - sigaddset(&set, SIGIO); - sigprocmask(SIG_UNBLOCK, &set, NULL); + sigprocmask(SIG_SETMASK, &PreviousSigIOMask, 0); } else if (sigio_blocked < 0) { BUG_WARN(sigio_blocked < 0); sigio_blocked = 0; @@ -1583,7 +1580,7 @@ Win32TempDir() if (getenv("TEMP") != NULL) return getenv("TEMP"); else if (getenv("TMP") != NULL) - return getenv("TEMP"); + return getenv("TMP"); else return "/tmp"; } |