Work around environments that (stupidly) ignore SIGALRM.
authorBruno Haible <bruno@clisp.org>
Tue, 10 Jun 2008 10:13:43 +0000 (12:13 +0200)
committerBruno Haible <bruno@clisp.org>
Tue, 10 Jun 2008 10:13:43 +0000 (12:13 +0200)
ChangeLog
tests/test-memmem.c
tests/test-strcasestr.c
tests/test-strstr.c

index 2675fe2..97aec20 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-06-10  Bruno Haible  <bruno@clisp.org>
+
+       * 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  <bruno@clisp.org>
 
        Work around the Solaris 10 ACE ACLs ABI change.
index c074a4e..0061d54 100644 (file)
@@ -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
 
index 6eb145e..5e7fd36 100644 (file)
@@ -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
 
index 81242e5..9f2ecde 100644 (file)
@@ -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