X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Futils%2Fpintos;h=ccf10377641baf04ee31ad679e4df626b8f16dcc;hb=000aa464d48cc64e885137e1a8040aca75e9344a;hp=079ab5a34d22e8970a631203acdf6913e2a7a4fe;hpb=94e3568f3303b757f9e4133524b647163792662d;p=pintos-anon diff --git a/src/utils/pintos b/src/utils/pintos index 079ab5a..ccf1037 100755 --- a/src/utils/pintos +++ b/src/utils/pintos @@ -492,7 +492,9 @@ config.version = 6 guestOS = "linux" floppy0.present = FALSE memsize = $mem +EOF + print VMX < 0; last; @@ -711,7 +713,8 @@ sub xsystem { # 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. @@ -730,8 +733,9 @@ sub xsystem { } } } + } else { + waitpid ($pid, 0); } - waitpid ($pid, 0); alarm (0); &$cleanup (); @@ -752,7 +756,7 @@ sub xsystem { sub relay_signal { my ($pid, $signal, $cleanup) = @_; kill $signal, $pid; - File::Temp::cleanup(); + eval { File::Temp::cleanup() }; # Not defined in old File::Temp. &$cleanup (); $SIG{$signal} = 'DEFAULT'; kill $signal, getpid ();