Skip to content
Snippets Groups Projects
Commit e72414ba authored by Christopher J. Morrone's avatar Christopher J. Morrone
Browse files

Possible SIGPIPE bug fix.

parent e536da27
No related branches found
No related tags found
No related merge requests found
...@@ -31,8 +31,10 @@ ...@@ -31,8 +31,10 @@
#include <unistd.h> #include <unistd.h>
#include <stdlib.h> #include <stdlib.h>
#include <signal.h>
#include "src/common/xmalloc.h" #include "src/common/xmalloc.h"
#include "src/common/xsignal.h"
#include "src/slurmd/slurmd/slurmd.h" #include "src/slurmd/slurmd/slurmd.h"
#include "src/slurmd/common/slurmstepd_init.h" #include "src/slurmd/common/slurmstepd_init.h"
...@@ -49,6 +51,10 @@ static slurmd_job_t *_step_setup(slurm_addr *cli, slurm_addr *self, ...@@ -49,6 +51,10 @@ static slurmd_job_t *_step_setup(slurm_addr *cli, slurm_addr *self,
static void _step_cleanup(slurmd_job_t *job, slurm_msg_t *msg, int rc); static void _step_cleanup(slurmd_job_t *job, slurm_msg_t *msg, int rc);
static int block_signals[] = {
SIGPIPE, SIGHUP, 0
};
int int
main (int argc, char *argv[]) main (int argc, char *argv[])
{ {
...@@ -58,6 +64,7 @@ main (int argc, char *argv[]) ...@@ -58,6 +64,7 @@ main (int argc, char *argv[])
slurmd_job_t *job; slurmd_job_t *job;
int rc; int rc;
xsignal_block(block_signals);
conf = xmalloc(sizeof(*conf)); conf = xmalloc(sizeof(*conf));
conf->argv = &argv; conf->argv = &argv;
conf->argc = &argc; conf->argc = &argc;
......
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