mirror of
https://github.com/tmux/tmux.git
synced 2026-05-30 22:26:18 +00:00
Do not hang run-shell when job_run fails, from Barrett Ruth in GitHub
issue 5037.
This commit is contained in:
@@ -198,8 +198,17 @@ cmd_run_shell_timer(__unused int fd, __unused short events, void* arg)
|
|||||||
}
|
}
|
||||||
if (job_run(cmd, 0, NULL, NULL, cdata->s, cdata->cwd, NULL,
|
if (job_run(cmd, 0, NULL, NULL, cdata->s, cdata->cwd, NULL,
|
||||||
cmd_run_shell_callback, cmd_run_shell_free, cdata,
|
cmd_run_shell_callback, cmd_run_shell_free, cdata,
|
||||||
cdata->flags, -1, -1) == NULL)
|
cdata->flags, -1, -1) == NULL) {
|
||||||
|
if (cdata->item == NULL)
|
||||||
|
status_message_set(c, -1, 1, 0, 0,
|
||||||
|
"failed to run command: %s", cmd);
|
||||||
|
else {
|
||||||
|
cmdq_error(cdata->item,
|
||||||
|
"failed to run command: %s", cmd);
|
||||||
|
cmdq_continue(cdata->item);
|
||||||
|
}
|
||||||
cmd_run_shell_free(cdata);
|
cmd_run_shell_free(cdata);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user