aboutsummaryrefslogtreecommitdiff
path: root/server-job.c
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2009-11-02 21:38:27 +0000
committerTiago Cunha <tcunha@gmx.com>2009-11-02 21:38:27 +0000
commit053e40572c32d021ad8bd2922c97c5e6dcbe2c81 (patch)
tree90363ff5fecbb52e5f6ee2af5a47af93765c974d /server-job.c
parent47f69075a0d9abf031585eb86bea1646a3bf32eb (diff)
downloadrtmux-053e40572c32d021ad8bd2922c97c5e6dcbe2c81.tar.gz
rtmux-053e40572c32d021ad8bd2922c97c5e6dcbe2c81.tar.bz2
rtmux-053e40572c32d021ad8bd2922c97c5e6dcbe2c81.zip
Sync OpenBSD patchset 475:
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 'server-job.c')
-rw-r--r--server-job.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/server-job.c b/server-job.c
index 366ab2df..7417de96 100644
--- a/server-job.c
+++ b/server-job.c
@@ -1,4 +1,4 @@
-/* $Id: server-job.c,v 1.2 2009-10-28 23:14:15 tcunha Exp $ */
+/* $Id: server-job.c,v 1.3 2009-11-02 21:38:26 tcunha Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -64,7 +64,10 @@ restart:
if (job->callbackfn != NULL) {
job->callbackfn(job);
- goto restart; /* could be freed by callback */
+ if ((!job->flags & JOB_PERSIST)) {
+ job_free(job);
+ goto restart;
+ }
}
}
}