projects
/
pintos-anon
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
aeed008
)
Fix stupidity in last check-in.
author
Ben Pfaff
<blp@cs.stanford.edu>
Tue, 30 May 2006 21:33:10 +0000
(21:33 +0000)
committer
Ben Pfaff
<blp@cs.stanford.edu>
Tue, 30 May 2006 21:33:10 +0000
(21:33 +0000)
src/utils/pintos
patch
|
blob
|
history
diff --git
a/src/utils/pintos
b/src/utils/pintos
index 079ab5a34d22e8970a631203acdf6913e2a7a4fe..13d7e5436fbe77a79d18ac1d81b02083214fa8de 100755
(executable)
--- a/
src/utils/pintos
+++ b/
src/utils/pintos
@@
-703,7
+703,7
@@
sub xsystem {
my ($boots) = 0;
local ($|) = 1;
for (;;) {
my ($boots) = 0;
local ($|) = 1;
for (;;) {
- if (waitpid ($pid, WNOHANG)
=
= 0) {
+ if (waitpid ($pid, WNOHANG)
!
= 0) {
# Subprocess died. Pass through any remaining data.
print $buf while sysread ($in, $buf, 4096) > 0;
last;
# Subprocess died. Pass through any remaining data.
print $buf while sysread ($in, $buf, 4096) > 0;
last;
@@
-711,7
+711,8
@@
sub xsystem {
# Read and print out pipe data.
my ($len) = length ($buf);
# Read and print out pipe data.
my ($len) = length ($buf);
- last if sysread ($in, $buf, 4096, $len) <= 0;
+ waitpid ($pid, 0), last
+ if sysread ($in, $buf, 4096, $len) <= 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.
@@
-730,8
+731,9
@@
sub xsystem {
}
}
}
}
}
}
+ } else {
+ waitpid ($pid, 0);
}
}
- waitpid ($pid, 0);
alarm (0);
&$cleanup ();
alarm (0);
&$cleanup ();