aboutsummaryrefslogtreecommitdiff
path: root/tmux.h
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2009-11-01 23:20:37 +0000
committerNicholas Marriott <nicm@openbsd.org>2009-11-01 23:20:37 +0000
commit2f813ef75d7d1cfb32d78923ae6963be7266de55 (patch)
treefed2d2ac2f0b98903eea186a19f2444a8ee99452 /tmux.h
parent32299e401039e9c88e430516e9d85d59d551b859 (diff)
downloadrtmux-2f813ef75d7d1cfb32d78923ae6963be7266de55.tar.gz
rtmux-2f813ef75d7d1cfb32d78923ae6963be7266de55.tar.bz2
rtmux-2f813ef75d7d1cfb32d78923ae6963be7266de55.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 'tmux.h')
-rw-r--r--tmux.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/tmux.h b/tmux.h
index 41ace3a8..73ac9803 100644
--- a/tmux.h
+++ b/tmux.h
@@ -669,6 +669,7 @@ struct job {
int flags;
#define JOB_DONE 0x1
+#define JOB_PERSIST 0x2 /* don't free after callback */
RB_ENTRY(job) entry;
SLIST_ENTRY(job) lentry;
@@ -1301,8 +1302,9 @@ RB_PROTOTYPE(jobs, job, entry, job_cmp);
void job_tree_init(struct jobs *);
void job_tree_free(struct jobs *);
struct job *job_get(struct jobs *, const char *);
-struct job *job_add(struct jobs *, struct client *,
+struct job *job_add(struct jobs *, int, struct client *,
const char *, void (*)(struct job *), void (*)(void *), void *);
+void job_remove(struct jobs *, struct job *);
void job_free(struct job *);
int job_run(struct job *);
void job_kill(struct job *);