]> granicus.if.org Git - procps-ng/commitdiff
ps abort causes problems in testsuite
authorCraig Small <csmall@enc.com.au>
Sat, 3 Mar 2012 00:49:48 +0000 (11:49 +1100)
committerCraig Small <csmall@enc.com.au>
Sat, 3 Mar 2012 00:49:48 +0000 (11:49 +1100)
Under certain circumstances, using abort() when either make check
or make distcheck puts ps into an infinite loop around the
function catastrophic_failure() in ps and the C library raise
and abort functions.

Using exit removes this problem and does almost the same thing.

ps/global.c
testsuite/config/unix.exp

index 5bddb8c8d6f1587ff177726b5f5c36dab1d1e04b..11f058e5b6907dabb53ab29ca1c252d44ba54930 100644 (file)
@@ -515,5 +515,5 @@ catastrophic_failure(const char *filename,
                     const char *message)
 {
   error_at_line(0, 0, filename, linenum, message);
-  abort();
+  exit(EXIT_FAILURE);
 }
index 5331b0df3a91ecf821ab36370520c40680e3403e..6b95655f7615afe86c0c354362bfbbb033546ee2 100644 (file)
@@ -40,6 +40,7 @@ proc expect_pass { testname reg } {
     expect {
         -re "$reg" { pass "$testname" }
         default { fail "$testname" }
+               timeout { fail "$testname" }
     }
 }