projects
/
pintos-anon
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7aaf660
)
Fix treatment of timeouts in run-tests and pintos.
author
Ben Pfaff
<blp@cs.stanford.edu>
Tue, 23 Nov 2004 00:36:46 +0000
(
00:36
+0000)
committer
Ben Pfaff
<blp@cs.stanford.edu>
Tue, 23 Nov 2004 00:36:46 +0000
(
00:36
+0000)
grading/vm/run-tests
patch
|
blob
|
history
diff --git
a/grading/vm/run-tests
b/grading/vm/run-tests
index 85164aa28bbdc94fa8a072c929d22d943484b15d..61adbaf2fdb8c5548d553e9c2198ab38c6d874a6 100755
(executable)
--- a/
grading/vm/run-tests
+++ b/
grading/vm/run-tests
@@
-696,8
+696,15
@@
sub xsystem {
};
if ($@) {
die unless $@ eq "alarm\n"; # propagate unexpected errors
- print "Timed out $pid.\n";
- kill ('SIGTERM', $pid);
+ print "Timed out: ";
+ for (my ($i) = 0; $i < 10; $i++) {
+ kill ('SIGTERM', $pid);
+ sleep (1);
+ my ($retval) = waitpid ($pid, WNOHANG);
+ last if $retval == $pid || $retval == -1;
+ print "Waiting for $pid to die" if $i == 0;
+ print ".";
+ }
$status = 0;
}