[mpich2-commits] r7691 - mpich2/trunk/src/pm/hydra/pm/pmiserv

balaji at mcs.anl.gov balaji at mcs.anl.gov
Wed Jan 12 03:08:49 CST 2011


Author: balaji
Date: 2011-01-12 03:08:49 -0600 (Wed, 12 Jan 2011)
New Revision: 7691

Modified:
   mpich2/trunk/src/pm/hydra/pm/pmiserv/pmiserv_pmci.c
Log:
When the user presses Ctrl-C, we try to send a kill signal to the
proxies. But even if that's not successful, mpiexec should still exit.

Modified: mpich2/trunk/src/pm/hydra/pm/pmiserv/pmiserv_pmci.c
===================================================================
--- mpich2/trunk/src/pm/hydra/pm/pmiserv/pmiserv_pmci.c	2011-01-12 09:08:40 UTC (rev 7690)
+++ mpich2/trunk/src/pm/hydra/pm/pmiserv/pmiserv_pmci.c	2011-01-12 09:08:49 UTC (rev 7691)
@@ -33,25 +33,6 @@
     goto fn_exit;
 }
 
-static HYD_status cleanup_procs(void)
-{
-    HYD_status status = HYD_SUCCESS;
-
-    HYDU_FUNC_ENTER();
-
-    HYDU_dump_noprefix(stdout, "Ctrl-C caught... cleaning up processes\n");
-
-    status = cleanup_all_pgs();
-    HYDU_ERR_POP(status, "cleanup of processes failed\n");
-
-  fn_exit:
-    HYDU_FUNC_EXIT();
-    return status;
-
-  fn_fail:
-    goto fn_exit;
-}
-
 static HYD_status send_cmd_to_proxies(struct HYD_pmcd_hdr hdr)
 {
     struct HYD_pg *pg = &HYD_server_info.pg_list;
@@ -93,8 +74,10 @@
     HYDU_ASSERT(!closed, status);
 
     if (cmd.type == HYD_CLEANUP) {
-        status = cleanup_procs();
-        HYDU_ERR_POP(status, "error cleaning up processes\n");
+        HYDU_dump_noprefix(stdout, "Ctrl-C caught... cleaning up processes\n");
+        status = cleanup_all_pgs();
+        HYDU_ERR_POP(status, "cleanup of processes failed\n");
+        exit(1);
     }
     else if (cmd.type == HYD_CKPOINT) {
         HYD_pmcd_init_header(&hdr);



More information about the mpich2-commits mailing list