From 1e7689538f2caa67f3fa26b3dc923d0cc51a8c85 Mon Sep 17 00:00:00 2001 From: "Christopher J. Morrone" <morrone2@llnl.gov> Date: Thu, 14 Sep 2006 01:37:27 +0000 Subject: [PATCH] Fix msg->in==NULL case for batch script. --- src/slurmd/slurmstepd/slurmstepd_job.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/slurmd/slurmstepd/slurmstepd_job.c b/src/slurmd/slurmstepd/slurmstepd_job.c index e7f6542ab9c..683a7927435 100644 --- a/src/slurmd/slurmstepd/slurmstepd_job.c +++ b/src/slurmd/slurmstepd/slurmstepd_job.c @@ -338,6 +338,7 @@ job_batch_job_create(batch_job_launch_msg_t *msg) struct passwd *pwd; slurmd_job_t *job; srun_info_t *srun = NULL; + char *in_name; xassert(msg != NULL); @@ -402,8 +403,14 @@ job_batch_job_create(batch_job_launch_msg_t *msg) xmalloc(sizeof(slurmd_task_info_t *)); if (msg->err == NULL) msg->err = xstrdup(msg->out); + + if (msg->in == NULL) + in_name = xstrdup("/dev/null"); + else + in_name = fname_create(job, msg->in, 0); + job->task[0] = task_info_create(0, 0, - _batchfilename(job, msg->in), + in_name, _batchfilename(job, msg->out), _batchfilename(job, msg->err)); -- GitLab