diff options
author | Thomas Adam <thomas@xteddy.org> | 2018-08-27 13:02:38 +0100 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2018-08-27 13:02:38 +0100 |
commit | 18b611bc8d971f466524efbc755cc22238d63db4 (patch) | |
tree | faec5f736325b6f7be9564a7453d79733657ad74 /cmd-if-shell.c | |
parent | 79a9472dbc3a0c2c635f9761909c6184c53d3a17 (diff) | |
parent | 79d2351ce8acbd579081e558cdbaebe333e10153 (diff) | |
download | rtmux-18b611bc8d971f466524efbc755cc22238d63db4.tar.gz rtmux-18b611bc8d971f466524efbc755cc22238d63db4.tar.bz2 rtmux-18b611bc8d971f466524efbc755cc22238d63db4.zip |
Merge branch 'obsd-master'
Diffstat (limited to 'cmd-if-shell.c')
-rw-r--r-- | cmd-if-shell.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/cmd-if-shell.c b/cmd-if-shell.c index ffdbe788..480912df 100644 --- a/cmd-if-shell.c +++ b/cmd-if-shell.c @@ -120,8 +120,13 @@ cmd_if_shell_exec(struct cmd *self, struct cmdq_item *item) cdata->item = NULL; memcpy(&cdata->mouse, &shared->mouse, sizeof cdata->mouse); - job_run(shellcmd, s, server_client_get_cwd(item->client, s), NULL, - cmd_if_shell_callback, cmd_if_shell_free, cdata, 0); + if (job_run(shellcmd, s, server_client_get_cwd(item->client, s), NULL, + cmd_if_shell_callback, cmd_if_shell_free, cdata, 0) == NULL) { + cmdq_error(item, "failed to run command: %s", shellcmd); + free(shellcmd); + free(cdata); + return (CMD_RETURN_ERROR); + } free(shellcmd); if (args_has(args, 'b')) |