From 72a9261fccc4b028260431b1b4dd6246086aba52 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Tue, 10 Jun 2008 12:13:43 +0200 Subject: [PATCH] Work around environments that (stupidly) ignore SIGALRM. --- ChangeLog | 7 +++++++ tests/test-memmem.c | 1 + tests/test-strcasestr.c | 1 + tests/test-strstr.c | 1 + 4 files changed, 10 insertions(+) diff --git a/ChangeLog b/ChangeLog index 2675fe2bf..97aec20e8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-06-10 Bruno Haible + + * tests/test-memmem.c (main): Reset SIGALRM to default handling before + using alarm(). + * tests/test-strcasestr.c (main): Likewise. + * tests/test-strstr.c (main): Likewise. + 2008-06-09 Bruno Haible Work around the Solaris 10 ACE ACLs ABI change. diff --git a/tests/test-memmem.c b/tests/test-memmem.c index c074a4e52..0061d5460 100644 --- a/tests/test-memmem.c +++ b/tests/test-memmem.c @@ -43,6 +43,7 @@ main (int argc, char *argv[]) caused by SIGALRM. All known platforms that lack alarm also lack memmem, and the replacement memmem is known to not take too long. */ + signal (SIGALRM, SIG_DFL); alarm (100); #endif diff --git a/tests/test-strcasestr.c b/tests/test-strcasestr.c index 6eb145eb3..5e7fd36cd 100644 --- a/tests/test-strcasestr.c +++ b/tests/test-strcasestr.c @@ -44,6 +44,7 @@ main () caused by SIGALRM. All known platforms that lack alarm also lack memmem, and the replacement memmem is known to not take too long. */ + signal (SIGALRM, SIG_DFL); alarm (50); #endif diff --git a/tests/test-strstr.c b/tests/test-strstr.c index 81242e5b4..9f2ecde1a 100644 --- a/tests/test-strstr.c +++ b/tests/test-strstr.c @@ -43,6 +43,7 @@ main (int argc, char *argv[]) caused by SIGALRM. All known platforms that lack alarm also have a quadratic strstr, and the replacement strstr is known to not take too long. */ + signal (SIGALRM, SIG_DFL); alarm (50); #endif -- 2.11.0