projects
/
pintos-anon
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
pintos: Avoid apparent name collision in definition of SIGALRM subroutine.
[pintos-anon]
/
src
/
utils
/
pintos
diff --git
a/src/utils/pintos
b/src/utils/pintos
index eca4708516e41f3c715d2145e761ba775036ed6a..e460866719588afb40838e9fead814bc14abfeea 100755
(executable)
--- a/
src/utils/pintos
+++ b/
src/utils/pintos
@@
-827,8
+827,8
@@
sub xsystem {
# Read and print out pipe data.
my ($len) = length ($buf);
# Read and print out pipe data.
my ($len) = length ($buf);
- waitpid ($pid, 0), last
-
if sysread ($in, $buf, 4096, $len)
<= 0;
+ my ($n_read) = sysread ($in, $buf, 4096, $len);
+
waitpid ($pid, 0), last if !defined ($n_read) || $n_read
<= 0;
print substr ($buf, $len);
# Remove full lines from $buf and scan them for keywords.
print substr ($buf, $len);
# Remove full lines from $buf and scan them for keywords.
@@
-853,7
+853,7
@@
sub xsystem {
alarm (0);
&$cleanup ();
alarm (0);
&$cleanup ();
- if (WIFSIGNALED ($?) && WTERMSIG ($?) == SIGVTALRM ()) {
+ if (WIFSIGNALED ($?) && WTERMSIG ($?) == SIGVTALRM
_number
()) {
seek (STDOUT, 0, 2);
print "\nTIMEOUT after $timeout seconds of host CPU time\n";
exit 0;
seek (STDOUT, 0, 2);
print "\nTIMEOUT after $timeout seconds of host CPU time\n";
exit 0;
@@
-912,7
+912,7
@@
sub get_load_average {
# Calls setitimer to set a timeout, then execs what was passed to us.
sub exec_setitimer {
if (defined $timeout) {
# Calls setitimer to set a timeout, then execs what was passed to us.
sub exec_setitimer {
if (defined $timeout) {
- if ($
\16
ge 5.8.0) {
+ if ($
^V
ge 5.8.0) {
eval "
use Time::HiRes qw(setitimer ITIMER_VIRTUAL);
setitimer (ITIMER_VIRTUAL, $timeout, 0);
eval "
use Time::HiRes qw(setitimer ITIMER_VIRTUAL);
setitimer (ITIMER_VIRTUAL, $timeout, 0);
@@
-928,7
+928,7
@@
sub exec_setitimer {
exit (1);
}
exit (1);
}
-sub SIGVTALRM {
+sub SIGVTALRM
_number
{
use Config;
my $i = 0;
foreach my $name (split(' ', $Config{sig_name})) {
use Config;
my $i = 0;
foreach my $name (split(' ', $Config{sig_name})) {