Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Adding missing handler when a restart crash.
[hpcvm.git] / src / and / hpcvm / Client.java
index 662944e..232a58c 100644 (file)
@@ -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() ;
                                        }