Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SUBDIRS = src/client src/server src/fe doc
SUBDIRS = src/client src/server src/fe src/config_helper doc
if BLD_SLURMPLUGIN
SUBDIRS += src/slurm_plugin
endif
Expand Down
8 changes: 4 additions & 4 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,8 @@ am__define_uniq_tagged_files = \
ETAGS = etags
CTAGS = ctags
CSCOPE = cscope
DIST_SUBDIRS = src/client src/server src/fe doc src/slurm_plugin \
src/flux testsuite
DIST_SUBDIRS = src/client src/server src/fe src/config_helper doc \
src/slurm_plugin src/flux testsuite
am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \
$(top_srcdir)/scripts/ar-lib $(top_srcdir)/scripts/compile \
$(top_srcdir)/scripts/config.guess \
Expand Down Expand Up @@ -380,8 +380,8 @@ target_vendor = @target_vendor@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUBDIRS = src/client src/server src/fe doc $(am__append_1) \
$(am__append_2) $(am__append_3)
SUBDIRS = src/client src/server src/fe src/config_helper doc \
$(am__append_1) $(am__append_2) $(am__append_3)
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive

Expand Down
3 changes: 2 additions & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -5775,7 +5775,7 @@ $as_echo "$ac_cv_path_SED" >&6; }

ac_config_headers="$ac_config_headers config.h"

ac_config_files="$ac_config_files src/flux/Makefile src/slurm_plugin/Makefile doc/Makefile testsuite/Makefile Makefile"
ac_config_files="$ac_config_files src/flux/Makefile src/slurm_plugin/Makefile src/config_helper/Makefile doc/Makefile testsuite/Makefile Makefile"

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
$as_echo_n "checking whether ln -s works... " >&6; }
Expand Down Expand Up @@ -20131,6 +20131,7 @@ do
"config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
"src/flux/Makefile") CONFIG_FILES="$CONFIG_FILES src/flux/Makefile" ;;
"src/slurm_plugin/Makefile") CONFIG_FILES="$CONFIG_FILES src/slurm_plugin/Makefile" ;;
"src/config_helper/Makefile") CONFIG_FILES="$CONFIG_FILES src/config_helper/Makefile" ;;
"doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
"testsuite/Makefile") CONFIG_FILES="$CONFIG_FILES testsuite/Makefile" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ AC_PROG_CC
AC_PROG_CXX
AC_PROG_SED
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([src/flux/Makefile src/slurm_plugin/Makefile doc/Makefile testsuite/Makefile Makefile])
AC_CONFIG_FILES([src/flux/Makefile src/slurm_plugin/Makefile src/config_helper/Makefile doc/Makefile testsuite/Makefile Makefile])
AC_PROG_LN_S
LT_INIT

Expand Down
1 change: 1 addition & 0 deletions src/client/crash_handler/crash_handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,7 @@ int crash_handler_install(int global_rank, int ldcsid_in)
sigaddset(&sa.sa_mask, SIGABRT);

const int sigs[] = { SIGSEGV, SIGBUS, SIGFPE, SIGILL, SIGABRT };
crash_sigchain_activate();
for (size_t i = 0; i < sizeof(sigs) / sizeof(sigs[0]); i++) {
/* If a signal handler was already installed by the time Spindle
registers its signal handler, we save it to use in
Expand Down
10 changes: 10 additions & 0 deletions src/client/crash_handler/crash_sigchain.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,18 @@ struct app_disposition {

static const int OWNED_SIGS[] = { SIGSEGV, SIGBUS, SIGFPE, SIGILL, SIGABRT };

/* Set once the crash handler has installed its handlers. */
static int sigchain_active = 0;

void crash_sigchain_activate(void)
{
sigchain_active = 1;
}

int crash_sigchain_is_owned(int sig)
{
if (!sigchain_active)
return 0;
for (size_t i = 0; i < sizeof(OWNED_SIGS) / sizeof(OWNED_SIGS[0]); i++) {
if (OWNED_SIGS[i] == sig)
return 1;
Expand Down
1 change: 1 addition & 0 deletions src/client/crash_handler/crash_sigchain.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA
#define CRASH_CHAIN_HANDLED 1 /* application handler ran and returned */
#define CRASH_CHAIN_IGNORED 2 /* application disposition is SIG_IGN */

void crash_sigchain_activate(void);
int crash_sigchain_is_owned(int sig);
void crash_sigchain_register_existing_handler(int sig, const struct sigaction *handler_old);
int crash_sigchain_chain_to_app(int sig, siginfo_t *info, void *ucontext);
Expand Down
24 changes: 24 additions & 0 deletions src/config_helper/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
bin_PROGRAMS = spindle-config-helper

spindle_config_helper_SOURCES = spindle-config-helper.cc

spindle_config_helper_CPPFLAGS = -I$(top_srcdir)/src/include \
-I$(top_srcdir)/src/fe/startup \
-I$(top_srcdir)/src/fe/logging \
-I$(top_srcdir)/src/utils \
-I$(top_srcdir)/src/server/cache \
-I$(top_srcdir)/src/server/comlib \
-I$(top_srcdir)/src/cobo \
-I$(top_srcdir)/src/fe/comlib \
-DPKGSYSCONFDIR=\"$(PKGSYSCONF_DIR)\" \
$(MPI_CXXFLAGS)

spindle_config_helper_CXXFLAGS = $(MPI_CXXFLAGS)

spindle_config_helper_LDFLAGS = $(MPI_CXXLDFLAGS)

spindle_config_helper_LDADD = $(top_builddir)/src/fe/startup/libconfigparse.a \
$(top_builddir)/src/fe/logging/libspindleflogc.la \
-lpthread

man_MANS = man/spindle-config-helper.1
Loading