X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/hpcvm.git/blobdiff_plain/9e53fd0b0fd58c90f1a55341f25f42426a520283..b956a81261e5bebb70d8fffc2756b09cfdf9ea91:/src/and/hpcvm/Client.java?ds=sidebyside diff --git a/src/and/hpcvm/Client.java b/src/and/hpcvm/Client.java index 662944e..e3233eb 100644 --- a/src/and/hpcvm/Client.java +++ b/src/and/hpcvm/Client.java @@ -1245,7 +1245,7 @@ public class Client extends UnicastRemoteObject implements ServicesClient while( (line = br.readLine()) != null ) { System.err.println( line ) ; - if( line.contains( "egmentation" ) ) + if( line.contains( "egmentation" ) || _p.exitValue() == 139 ) { ret = true ; } @@ -1258,6 +1258,13 @@ public class Client extends UnicastRemoteObject implements ServicesClient return ret ; } + + @Override + public int echo() + { + return 0 ; + } + @Override public int start() @@ -1479,7 +1486,13 @@ public class Client extends UnicastRemoteObject implements ServicesClient saveRequest.setStatus( false ) ; /* Requesting the VM save */ - saveVM() ; + if( saveVM() == 1 ) + { + System.err.println( "Problem while saving. Exiting ..." ) ; + pingServer.stopPing() ; + emergencyStop() ; + System.exit( 1 ) ; + } } else { sendSaveOkVM() ; } @@ -1519,6 +1532,7 @@ public class Client extends UnicastRemoteObject implements ServicesClient /* Close streams */ reader.close() ; reader = null ; socket.close() ; socket = null ; + System.out.println( "Application is starting." ) ; try { LocalHost.Instance().getServerStub().goApplication() ;