aboutsummaryrefslogtreecommitdiff
path: root/cmd-if-shell.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2018-08-23 19:02:40 +0100
committerThomas Adam <thomas@xteddy.org>2018-08-23 19:02:40 +0100
commitda5d5633757ac01fbeb42bf763415ba2314b82dd (patch)
tree51ecd06a0d11700115216b99fd26e95b35dfc08a /cmd-if-shell.c
parent183193bdbc1e1b3638644a2c2ce7e7861b632c16 (diff)
parentbceccc6b63b48ddeefb035ef6d910bea60340342 (diff)
downloadrtmux-da5d5633757ac01fbeb42bf763415ba2314b82dd.tar.gz
rtmux-da5d5633757ac01fbeb42bf763415ba2314b82dd.tar.bz2
rtmux-da5d5633757ac01fbeb42bf763415ba2314b82dd.zip
Merge branch 'obsd-master'
Diffstat (limited to 'cmd-if-shell.c')
-rw-r--r--cmd-if-shell.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/cmd-if-shell.c b/cmd-if-shell.c
index d7ce3039..ffdbe788 100644
--- a/cmd-if-shell.c
+++ b/cmd-if-shell.c
@@ -132,14 +132,16 @@ cmd_if_shell_exec(struct cmd *self, struct cmdq_item *item)
static void
cmd_if_shell_callback(struct job *job)
{
- struct cmd_if_shell_data *cdata = job->data;
+ struct cmd_if_shell_data *cdata = job_get_data(job);
struct client *c = cdata->client;
struct cmd_list *cmdlist;
struct cmdq_item *new_item;
char *cause, *cmd, *file = cdata->file;
u_int line = cdata->line;
+ int status;
- if (!WIFEXITED(job->status) || WEXITSTATUS(job->status) != 0)
+ status = job_get_status(job);
+ if (!WIFEXITED(status) || WEXITSTATUS(status) != 0)
cmd = cdata->cmd_else;
else
cmd = cdata->cmd_if;