コード例 #1
0
 public static ActionResult StopProcesses(Session session)
 {
     try
     {
         session.Log("Stopping running MP2 processes");
         // the server service needs quite some time to exit, so we specify an timeout of 30 seconds
         // this timeout is used for every single process
         // also, if any process has not exited after this time, kill it
         IpcClient.ShutdownAllApplications(30000, true);
         return(ActionResult.Success);
     }
     catch (Exception ex)
     {
         session.Log("StopProcesses: Error: " + ex.Message);
         return(ActionResult.Failure);
     }
 }