[mpich2-commits] r4007 - mpich2/trunk/src/pm/hydra/pm/central
balaji at mcs.anl.gov
balaji at mcs.anl.gov
Wed Mar 11 03:45:35 CDT 2009
Author: balaji
Date: 2009-03-11 03:45:35 -0500 (Wed, 11 Mar 2009)
New Revision: 4007
Modified:
mpich2/trunk/src/pm/hydra/pm/central/central_cb.c
Log:
Cleanup processes when the application aborts abruptly. This should fix ticket #356.
Modified: mpich2/trunk/src/pm/hydra/pm/central/central_cb.c
===================================================================
--- mpich2/trunk/src/pm/hydra/pm/central/central_cb.c 2009-03-11 08:06:04 UTC (rev 4006)
+++ mpich2/trunk/src/pm/hydra/pm/central/central_cb.c 2009-03-11 08:45:35 UTC (rev 4007)
@@ -72,11 +72,21 @@
}
if (linelen == 0) {
+ /* This is not a clean close. If a finalize was called, we
+ * would have deregistered this socket. The application
+ * might have aborted. Just cleanup all the processes */
+ status = HYD_BSCI_Cleanup_procs();
+ if (status != HYD_SUCCESS) {
+ HYDU_Error_printf("unable to deregister fd %d\n", fd);
+ goto fn_fail;
+ }
+
status = HYD_DMX_Deregister_fd(fd);
if (status != HYD_SUCCESS) {
HYDU_Error_printf("unable to deregister fd %d\n", fd);
goto fn_fail;
}
+
close(fd);
goto fn_exit;
}
More information about the mpich2-commits
mailing list