Skip to content

Commit

Permalink
ch3/sock: ignore SIGUSR1
Browse files Browse the repository at this point in the history
When hydra's -disable-auto-cleanup, it sends SIGUSR1 to notify process
failures. ch3:sock does not support this feature, but at least ignore
the signal to prevent it being killed by it.
  • Loading branch information
hzhou committed Feb 17, 2023
1 parent 336f18b commit ab17b26
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
4 changes: 4 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -3699,6 +3699,10 @@ if test "$enable_g_mem" != "yes" ; then
fi
fi

# make sure we support signal
AC_CHECK_HEADERS(signal.h)
AC_CHECK_FUNCS(signal)

# ----------------------------------------------------------------------------
# Look for some non-posix, but commonly provided functions
# ----------------------------------------------------------------------------
Expand Down
4 changes: 0 additions & 4 deletions src/mpid/ch3/channels/nemesis/subconfigure.m4
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,6 @@ fi
AC_ARG_ENABLE(fast, [--enable-fast - pick the appropriate options for fast execution.
This turns off error checking and timing collection],,enable_fast=no)
# make sure we support signal
AC_CHECK_HEADERS(signal.h)
AC_CHECK_FUNCS(signal)
nemesis_nets_dirs=""
nemesis_nets_strings=""
nemesis_nets_array=""
Expand Down
6 changes: 6 additions & 0 deletions src/mpid/ch3/channels/sock/src/sock.c
Original file line number Diff line number Diff line change
Expand Up @@ -1200,6 +1200,12 @@ int MPIDI_CH3I_Sock_init(void)
MPIDI_CH3I_DBG_SOCK_CONNECT = MPL_dbg_class_alloc("SOCK_CONNECT", "sock_connect");
#endif

#ifdef HAVE_SIGNAL
/* ch3:sock do not support fault-tolerance feature, disable the signal so
* hydra's -disable-auto-cleanup can still work */
signal(SIGUSR1, SIG_IGN);
#endif

MPIDI_CH3I_Socki_initialized++;

MPIR_FUNC_EXIT;
Expand Down
4 changes: 0 additions & 4 deletions src/mpid/ch4/subconfigure.m4
Original file line number Diff line number Diff line change
Expand Up @@ -395,10 +395,6 @@ if test "$ac_cv_func_gethostname" = "yes" ; then
PAC_FUNC_NEEDS_DECL([#include <unistd.h>],gethostname)
fi
# make sure we support signal
AC_CHECK_HEADERS(signal.h)
AC_CHECK_FUNCS(signal)
AC_CONFIG_FILES([
src/mpid/ch4/src/mpid_ch4_net_array.c
src/mpid/ch4/include/netmodpre.h
Expand Down

0 comments on commit ab17b26

Please sign in to comment.