(timeout_handler): Allow expected signal to be SIGALRM.
authordrepper <drepper>
Sat, 7 Dec 2002 05:27:03 +0000 (05:27 +0000)
committerdrepper <drepper>
Sat, 7 Dec 2002 05:27:03 +0000 (05:27 +0000)
test-skeleton.c

index a285478..2b5102b 100644 (file)
@@ -145,6 +145,12 @@ timeout_handler (int sig __attribute__ ((unused)))
   CLEANUP_HANDLER;
 #endif
 
+  /* If we expected this signal: good!  */
+#ifdef EXPECTED_SIGNAL
+  if (EXPECTED_SIGNAL == SIGALRM)
+    exit (0);
+#endif
+
   if (WIFSIGNALED (status) && WTERMSIG (status) == SIGKILL)
     fputs ("Timed out: killed the child process\n", stderr);
   else if (WIFSTOPPED (status))