diff options
author | Thomas Adam <thomas@xteddy.org> | 2020-06-12 12:01:17 +0100 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2020-06-12 12:01:17 +0100 |
commit | 4000052d92395a41cdaa79cfc1df38fc89858cf4 (patch) | |
tree | 7603fd4c880ca475ac398a4dc78b5898b221f92b | |
parent | bd3fb2fb108c030d6acef8579027e13a92c7f42f (diff) | |
parent | d52ac7d027e40b34e7089addc4f905d03d9c1b16 (diff) | |
download | rtmux-4000052d92395a41cdaa79cfc1df38fc89858cf4.tar.gz rtmux-4000052d92395a41cdaa79cfc1df38fc89858cf4.tar.bz2 rtmux-4000052d92395a41cdaa79cfc1df38fc89858cf4.zip |
Merge branch 'obsd-master'
-rw-r--r-- | cmd-run-shell.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/cmd-run-shell.c b/cmd-run-shell.c index 3792aaae..647f533f 100644 --- a/cmd-run-shell.c +++ b/cmd-run-shell.c @@ -56,6 +56,7 @@ struct cmd_run_shell_data { struct session *s; int wp_id; struct event timer; + int flags; }; static void @@ -110,6 +111,8 @@ cmd_run_shell_exec(struct cmd *self, struct cmdq_item *item) if (!args_has(args, 'b')) cdata->item = item; + else + cdata->flags |= JOB_NOWAIT; cdata->cwd = xstrdup(server_client_get_cwd(cmdq_get_client(item), 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 (job_run(cdata->cmd, cdata->s, cdata->cwd, NULL, - cmd_run_shell_callback, cmd_run_shell_free, cdata, 0, -1, - -1) == NULL) + cmd_run_shell_callback, cmd_run_shell_free, cdata, + cdata->flags, -1, -1) == NULL) cmd_run_shell_free(cdata); } else { if (cdata->item != NULL) |