summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/cmd-run-shell.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2009-11-01 23:20:37 +0000
committernicm <nicm@openbsd.org>2009-11-01 23:20:37 +0000
commit8fa62d4f0962cba060ad8da1fc86b25b571c71d1 (patch)
treeddca20aaf5d9089774de26d27f5392c06d1cedf9 /usr.bin/tmux/cmd-run-shell.c
parentIf the last name field looks like a description rather than an alias (if it (diff)
downloadwireguard-openbsd-8fa62d4f0962cba060ad8da1fc86b25b571c71d1.tar.xz
wireguard-openbsd-8fa62d4f0962cba060ad8da1fc86b25b571c71d1.zip
Add a flag for jobs that shouldn't be freed after they've died and use it for
status jobs, then only kill those jobs when status-left, status-right or set-titles-string is changed. Fixes problems with changing options from inside #().
Diffstat (limited to 'usr.bin/tmux/cmd-run-shell.c')
-rw-r--r--usr.bin/tmux/cmd-run-shell.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/usr.bin/tmux/cmd-run-shell.c b/usr.bin/tmux/cmd-run-shell.c
index 806f91280aa..3106466694e 100644
--- a/usr.bin/tmux/cmd-run-shell.c
+++ b/usr.bin/tmux/cmd-run-shell.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-run-shell.c,v 1.3 2009/10/11 09:04:33 nicm Exp $ */
+/* $OpenBSD: cmd-run-shell.c,v 1.4 2009/11/01 23:20:37 nicm Exp $ */
/*
* Copyright (c) 2009 Tiago Cunha <me@tiagocunha.org>
@@ -65,7 +65,7 @@ cmd_run_shell_exec(struct cmd *self, struct cmd_ctx *ctx)
if (ctx->curclient != NULL)
ctx->curclient->references++;
- job = job_add(NULL, NULL,
+ job = job_add(NULL, 0, NULL,
data->arg, cmd_run_shell_callback, cmd_run_shell_free, cdata);
job_run(job);
@@ -117,8 +117,6 @@ cmd_run_shell_callback(struct job *job)
ctx->info(ctx, "%s", msg);
xfree(msg);
}
-
- job_free(job); /* calls cmd_run_shell_free */
}
void