Skip to content
Snippets Groups Projects
Commit 60a563ac authored by Mark Grondona's avatar Mark Grondona
Browse files

o fix for problem with SIGCHLD and sigwait on RH9-based systems.

   Install a dummy handler for SIGCHLD so our process is actually
   delivered said signal.
parent b8f7993d
No related branches found
No related tags found
No related merge requests found
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
#include <pwd.h> #include <pwd.h>
#include <grp.h> #include <grp.h>
#include <string.h> #include <string.h>
#include <assert.h>
#if HAVE_STDLIB_H #if HAVE_STDLIB_H
# include <stdlib.h> # include <stdlib.h>
...@@ -88,6 +89,20 @@ static int _setup_env(slurmd_job_t *job, int taskid); ...@@ -88,6 +89,20 @@ static int _setup_env(slurmd_job_t *job, int taskid);
static void _pdebug_trace_process(slurmd_job_t *job, pid_t pid); static void _pdebug_trace_process(slurmd_job_t *job, pid_t pid);
static void _pdebug_stop_current(slurmd_job_t *job); static void _pdebug_stop_current(slurmd_job_t *job);
/*
* Dummy handler for SIGCHLD.
*
* We need this handler to work around what may be a bug in
* RedHat 9 based kernel/glibc. If no handler is installed for
* any signal that is, by default, ignored, then the signal
* will not be delivered even if that signal is currently blocked.
*
* Since we block SIGCHLD, this handler should never actually
* get invoked. Assert this fact.
*/
static void _chld_handler(int signo) { assert(signo != SIGCHLD); }
/* /*
* Create the slurmd session manager process * Create the slurmd session manager process
*/ */
...@@ -119,6 +134,11 @@ _session_mgr(slurmd_job_t *job) ...@@ -119,6 +134,11 @@ _session_mgr(slurmd_job_t *job)
{ {
xassert(job != NULL); xassert(job != NULL);
/*
* Install dummy SIGCHLD handler (see comments above)
*/
xsignal(SIGCHLD, &_chld_handler);
/* /*
* Call interconnect_init() before becoming user * Call interconnect_init() before becoming user
*/ */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment