diff --git a/src/slurmd/Makefile.am b/src/slurmd/Makefile.am index 513105f3d48fd242fab760d97ecbe1b67d306958..c9e8ac0978ef9f2f1972d03aa18752bccc9d2c13 100644 --- a/src/slurmd/Makefile.am +++ b/src/slurmd/Makefile.am @@ -6,7 +6,8 @@ AUTOMAKE_OPTIONS = foreign sbin_PROGRAMS = slurmd slurmd_step -INCLUDES = -I$(top_srcdir) $(SSL_CPPFLAGS) +INCLUDES = -I$(top_srcdir) $(SSL_CPPFLAGS) \ + -DSLURMD_STEP_PATH=\"$(prefix)/sbin/slurmd_step\" slurmd_LDADD = \ $(top_builddir)/src/common/libcommon.la \ diff --git a/src/slurmd/req.c b/src/slurmd/req.c index 202fd9f959d08207efce372e66c771731bdb7ea2..2dc42e2e86c63692d618c257fdb00a5dea77bdb3 100644 --- a/src/slurmd/req.c +++ b/src/slurmd/req.c @@ -392,10 +392,11 @@ _fork_new_slurmd(slurmd_step_type_t type, void *req, exit(1); } argv = xmalloc(2 * sizeof(char *)); - argv[0] = "slurmd_step"; + argv[0] = SLURMD_STEP_PATH; argv[1] = NULL; - execvp("slurmd_step", argv); - + execvp(argv[0], argv); + error("Unable to run slurmd_step in %s", SLURMD_STEP_PATH); + if (close(fds[0]) < 0) error("Unable to close read-pipe in grandchild: %m");