From 249565a07d1d243e27440e2a5ecf4c95490903c6 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sun, 9 Feb 2014 23:13:51 -0800 Subject: [PATCH] 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 Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard --- test/os.c | 4 ++-- 1 file 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 }