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

Fix tes6.12 by unblocking signals in tasks processes that were

globally blocked in slurmstepd.  Also fix bug in the test itself.
parent c03ce93e
No related branches found
No related tags found
No related merge requests found
......@@ -16,7 +16,7 @@ slurmstepd_LDADD = \
slurmstepd_SOURCES = \
slurmstepd.c \
slurmstepd.c slurmstepd.h \
mgr.c mgr.h \
task.c task.h \
slurmstepd_job.c slurmstepd_job.h \
......
......@@ -71,6 +71,7 @@
#include "src/slurmd/common/setproctitle.h"
#include "src/slurmd/common/proctrack.h"
#include "src/slurmd/common/task_plugin.h"
#include "src/slurmd/slurmstepd/slurmstepd.h"
#include "src/slurmd/slurmstepd/mgr.h"
#include "src/slurmd/slurmstepd/task.h"
#include "src/slurmd/slurmstepd/io.h"
......@@ -593,6 +594,7 @@ _fork_all_tasks(slurmd_job_t *job)
return SLURM_ERROR;
} else if (pid == 0) { /* child */
int j;
#ifdef HAVE_AIX
(void) mkcrid(0);
#endif
......@@ -608,6 +610,8 @@ _fork_all_tasks(slurmd_job_t *job)
log_fini();
xsignal_unblock(slurmstepd_blocked_signals);
exec_task(job, i, readfds[i]);
}
......
......@@ -39,6 +39,7 @@
#include "src/slurmd/slurmd/slurmd.h"
#include "src/slurmd/common/slurmstepd_init.h"
#include "src/slurmd/common/stepd_api.h"
#include "src/slurmd/slurmstepd/slurmstepd.h"
#include "src/slurmd/slurmstepd/mgr.h"
#include "src/slurmd/slurmstepd/slurmstepd_job.h"
......@@ -50,9 +51,8 @@ static slurmd_job_t *_step_setup(slurm_addr *cli, slurm_addr *self,
slurm_msg_t *msg);
static void _step_cleanup(slurmd_job_t *job, slurm_msg_t *msg, int rc);
static int block_signals[] = {
SIGPIPE, SIGHUP, 0
int slurmstepd_blocked_signals[] = {
SIGPIPE, 0
};
int
......@@ -64,7 +64,7 @@ main (int argc, char *argv[])
slurmd_job_t *job;
int rc;
xsignal_block(block_signals);
xsignal_block(slurmstepd_blocked_signals);
conf = xmalloc(sizeof(*conf));
conf->argv = &argv;
conf->argc = &argc;
......
/*****************************************************************************\
* src/slurmd/slurmstepd/slurmstepd.h - slurmstepd general header file
* $Id: slurmstepd.h 6543 2005-11-05 00:00:55Z morrone $
*****************************************************************************
* Copyright (C) 2005 The Regents of the University of California.
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
* Written by Christopher J. Morrone <morrone2@llnl.gov>.
* UCRL-CODE-2002-040.
*
* This file is part of SLURM, a resource management program.
* For details, see <http://www.llnl.gov/linux/slurm/>.
*
* SLURM is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free
* Software Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* SLURM is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along
* with SLURM; if not, write to the Free Software Foundation, Inc.,
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
\*****************************************************************************/
#ifndef _SLURMSTEPD_H
#define _SLURMSTEPD_H
extern int slurmstepd_blocked_signals[];
#endif /* !_SLURMSTEPD_H */
......@@ -152,8 +152,10 @@ exec $scancel --quiet $job_id
# Build and run second test script
#
exec $bin_rm -f $file_in $file_out $file_err
exec echo "#!$bin_bash" >$file_in
exec echo "$bin_sleep 500" >>$file_in
set file [open $file_in "w"]
puts $file "#!$bin_bash"
puts $file "$bin_sleep 500"
close $file
exec $bin_chmod 700 $file_in
set job_id 0
......@@ -233,9 +235,11 @@ if {$exit_code != 0} {
#
set job_id 0
exec $bin_rm -f $file_in $file_out $file_err
exec echo "#!$bin_bash" >$file_in
exec echo "$srun $bin_sleep 500 &" >>$file_in
#exec echo "wait" >>$file_in
set file [open $file_in "w"]
puts $file "#!$bin_bash"
puts $file "$srun $bin_sleep 500"
#puts $file "wait"
close $file
exec $bin_chmod 700 $file_in
spawn $srun --batch --output=$file_out --error=$file_err -t2 $file_in
......
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