diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2014-02-09 23:13:51 -0800 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2014-02-24 16:32:04 -0800 |
commit | 249565a07d1d243e27440e2a5ecf4c95490903c6 (patch) | |
tree | 7b488fb3da4e9860a5b983fb4f039479c57520d7 /test | |
parent | 0031f6b073c7a4cca553c1d3e185a63436a75cbe (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.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 } |