From: Ben Pfaff Date: Mon, 20 Jun 2005 21:26:49 +0000 (+0000) Subject: Fix handling of timeouts. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bd4a59fe77f08752a08ef748e739428a59869657;p=pintos-anon Fix handling of timeouts. --- diff --git a/src/utils/pintos b/src/utils/pintos index 8721db3..348c6ab 100755 --- a/src/utils/pintos +++ b/src/utils/pintos @@ -682,10 +682,12 @@ sub relay_signal { # Interrupts $pid and dies with a timeout error message. sub timeout { my ($pid) = @_; - relay_signal ($pid, "INT"); + kill "INT", $pid; + waitpid ($pid, 0); + seek (STDOUT, 0, 2); my ($load_avg) = `uptime` =~ /(load average:.*)$/i; - print "TIMEOUT after $timeout seconds"; + print "\nTIMEOUT after $timeout seconds"; print " - $load_avg" if defined $load_avg; print "\n"; - exit (2); + exit 0; }