From 209378efec3f8cfe24877d7c1ddd4d4b0bb4a411 Mon Sep 17 00:00:00 2001 From: Gilles Gouaillardet Date: Tue, 13 May 2014 10:04:38 +0000 Subject: [PATCH] btl/scif: prevent SIGSEGV from occuring when the module is unloaded Fixes trac:4615 cmr=v1.8.2:reviewer=hjelmn This commit was SVN r31717. The following Trac tickets were found above: Ticket 4615 --> https://svn.open-mpi.org/trac/ompi/ticket/4615 --- ompi/mca/btl/scif/btl_scif_module.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ompi/mca/btl/scif/btl_scif_module.c b/ompi/mca/btl/scif/btl_scif_module.c index c47041c303..c5903d717d 100644 --- a/ompi/mca/btl/scif/btl_scif_module.c +++ b/ompi/mca/btl/scif/btl_scif_module.c @@ -125,6 +125,8 @@ mca_btl_scif_module_finalize (struct mca_btl_base_module_t *btl) /* close the listening endpoint */ if (-1 != mca_btl_scif_module.scif_fd) { + pthread_cancel(mca_btl_scif_module.listen_thread); + pthread_join(mca_btl_scif_module.listen_thread, NULL); scif_close (mca_btl_scif_module.scif_fd); }