summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2014-02-09 23:13:51 -0800
committerKeith Packard <keithp@keithp.com>2014-02-24 16:32:04 -0800
commit249565a07d1d243e27440e2a5ecf4c95490903c6 (patch)
tree7b488fb3da4e9860a5b983fb4f039479c57520d7 /test
parent0031f6b073c7a4cca553c1d3e185a63436a75cbe (diff)
Fix test/os to work on Solaris
Due to bad decisions made decades ago at AT&T, on SVR4 OS'es the signal() function resets the signal handler before calling the signal handler (equivalent to sigaction flag SA_RESETHAND). This is why the X server has a OsSignal() helper function in os/utils.c that uses the portable POSIX sigaction function to provide BSD/Linux semantics in a signal() style API, so we switch to use that in this test case, allowing it to pass on Solaris. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'test')
-rw-r--r--test/os.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/os.c b/test/os.c
index 2d005a0d4..d85dcffbe 100644
--- a/test/os.c
+++ b/test/os.c
@@ -150,10 +150,10 @@ static void block_sigio_test_nested(void)
tail guard must be hit.
*/
void (*old_handler)(int);
- old_handler = signal(SIGIO, sighandler);
+ old_handler = OsSignal(SIGIO, sighandler);
expect_signal = 1;
assert(raise(SIGIO) == 0);
- assert(signal(SIGIO, old_handler) == sighandler);
+ assert(OsSignal(SIGIO, old_handler) == sighandler);
#endif
}