aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2020-05-09 16:07:30 +0100
committerNicholas Marriott <nicholas.marriott@gmail.com>2020-05-09 16:08:13 +0100
commit532d06c39985536e14ab09bb19c69d93341f4b64 (patch)
tree3b0dca0fd64d350ceb258f2b9205d12e03012771
parent013d857ef8d0be9b862fd1496f35130f52306454 (diff)
downloadrtmux-532d06c39985536e14ab09bb19c69d93341f4b64.tar.gz
rtmux-532d06c39985536e14ab09bb19c69d93341f4b64.tar.bz2
rtmux-532d06c39985536e14ab09bb19c69d93341f4b64.zip
Initialize return code in case something mysterious happens.
-rw-r--r--cmd-run-shell.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/cmd-run-shell.c b/cmd-run-shell.c
index 82d4a1a2..3792aaae 100644
--- a/cmd-run-shell.c
+++ b/cmd-run-shell.c
@@ -190,7 +190,8 @@ cmd_run_shell_callback(struct job *job)
retcode = WTERMSIG(status);
xasprintf(&msg, "'%s' terminated by signal %d", cmd, retcode);
retcode += 128;
- }
+ } else
+ retcode = 0;
if (msg != NULL)
cmd_run_shell_print(job, msg);
free(msg);