From 84577ab32910ce1e9003c3bcab6cac6b5b1f16cf Mon Sep 17 00:00:00 2001 From: Danny Auble <da@schedmd.com> Date: Wed, 28 Aug 2013 14:08:22 -0700 Subject: [PATCH] Fix issue if program_invocation_name isn't available on the system. --- src/common/log.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/log.c b/src/common/log.c index b07f2dc32c3..3173d88af3c 100644 --- a/src/common/log.c +++ b/src/common/log.c @@ -312,7 +312,7 @@ _log_init(char *prog, log_options_t opt, log_facility_t fac, char *logfile ) } /* Only take the first one here. In some situations it can change. */ - if (!slurm_prog_name) + if (!slurm_prog_name && log->argv0 && (strlen(log->argv0) > 1)) slurm_prog_name = xstrdup(log->argv0); if (!log->fpfx) -- GitLab