Fix two bugs:
authorBen Pfaff <blp@cs.stanford.edu>
Tue, 30 May 2006 21:35:27 +0000 (21:35 +0000)
committerBen Pfaff <blp@cs.stanford.edu>
Tue, 30 May 2006 21:35:27 +0000 (21:35 +0000)
- If -s used with GSX, really don't provide serial port.
- Call File::Temp::cleanup() inside eval to cope with old versions
  of File::Temp that didn't have cleanup.

src/utils/pintos

index 13d7e5436fbe77a79d18ac1d81b02083214fa8de..ccf10377641baf04ee31ad679e4df626b8f16dcc 100755 (executable)
@@ -492,7 +492,9 @@ config.version = 6
 guestOS = "linux"
 floppy0.present = FALSE
 memsize = $mem
+EOF
 
+    print VMX <<EOF if $serial;
 serial0.present = TRUE
 serial0.fileType = "file"
 serial0.fileName = "pintos.out"
@@ -754,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 ();