diff --git a/src/common/pack.c b/src/common/pack.c index bd09dfbe53fb1fddf13475c53d0579f5b2213fa8..92c42ebaf2d10e963315836e38106055c20a7a57 100644 --- a/src/common/pack.c +++ b/src/common/pack.c @@ -268,11 +268,12 @@ _unpackstrarray (char ***valp, uint16_t *size_valp, void **bufp, int *lenp) *lenp -= sizeof(nl); if (*size_valp > 0) { - *valp = xmalloc(sizeof ( char * ) * *size_valp ) ; + *valp = xmalloc(sizeof ( char * ) * ( *size_valp +1 ) ) ; for ( i = 0 ; i < *size_valp ; i ++ ) { unpackstr_xmalloc ( & (*valp)[i] , & uint16_tmp , bufp , lenp ) ; } + (*valp)[i] = NULL ; /* NULL terminated array so that execle can detect end of array */ } else *valp = NULL; diff --git a/src/slurmd/task_mgr.c b/src/slurmd/task_mgr.c index 37c326e9526329fa3e86c74ceb9eb6ba9aeb31d0..9a190f5b8734d828974dba1ef1122cde16a8af73 100644 --- a/src/slurmd/task_mgr.c +++ b/src/slurmd/task_mgr.c @@ -316,12 +316,11 @@ void * task_exec_thread ( void * arg ) /* set session id */ - /* setup requested env */ - //setup_task_env ( task_arg ) ; - /* run bash and cmdline */ chdir ( launch_msg->cwd ) ; - execl ( "/bin/bash" , "bash" , "-c" , launch_msg->cmd_line ); + execl ( "/bin/sh", launch_msg->cmd_line ); + + //execle ( "/bin/sh", launch_msg->cmd_line , launch_msg->env ); _exit ( SLURM_SUCCESS ) ; default: /*parent proccess */