mirror of
https://github.com/tmux/tmux.git
synced 2025-01-08 08:58:47 +00:00
Merge branch 'obsd-master'
This commit is contained in:
commit
4000052d92
@ -56,6 +56,7 @@ struct cmd_run_shell_data {
|
|||||||
struct session *s;
|
struct session *s;
|
||||||
int wp_id;
|
int wp_id;
|
||||||
struct event timer;
|
struct event timer;
|
||||||
|
int flags;
|
||||||
};
|
};
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -110,6 +111,8 @@ cmd_run_shell_exec(struct cmd *self, struct cmdq_item *item)
|
|||||||
|
|
||||||
if (!args_has(args, 'b'))
|
if (!args_has(args, 'b'))
|
||||||
cdata->item = item;
|
cdata->item = item;
|
||||||
|
else
|
||||||
|
cdata->flags |= JOB_NOWAIT;
|
||||||
|
|
||||||
cdata->cwd = xstrdup(server_client_get_cwd(cmdq_get_client(item), s));
|
cdata->cwd = xstrdup(server_client_get_cwd(cmdq_get_client(item), s));
|
||||||
cdata->s = s;
|
cdata->s = s;
|
||||||
@ -144,8 +147,8 @@ cmd_run_shell_timer(__unused int fd, __unused short events, void* arg)
|
|||||||
|
|
||||||
if (cdata->cmd != NULL) {
|
if (cdata->cmd != NULL) {
|
||||||
if (job_run(cdata->cmd, cdata->s, cdata->cwd, NULL,
|
if (job_run(cdata->cmd, cdata->s, cdata->cwd, NULL,
|
||||||
cmd_run_shell_callback, cmd_run_shell_free, cdata, 0, -1,
|
cmd_run_shell_callback, cmd_run_shell_free, cdata,
|
||||||
-1) == NULL)
|
cdata->flags, -1, -1) == NULL)
|
||||||
cmd_run_shell_free(cdata);
|
cmd_run_shell_free(cdata);
|
||||||
} else {
|
} else {
|
||||||
if (cdata->item != NULL)
|
if (cdata->item != NULL)
|
||||||
|
Loading…
Reference in New Issue
Block a user