From 19f3a5c6120c5d845eb942e67413c03c0c008a87 Mon Sep 17 00:00:00 2001 From: nicm Date: Thu, 8 Mar 2018 08:09:10 +0000 Subject: Add a missing client-detached hook when the server shuts down, and do not exit until jobs started from run-shell/if-shell have finished (add a job flags member and a flag to indicate other jobs). GitHub issue 1245. --- job.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'job.c') diff --git a/job.c b/job.c index 866e36c7..5cbe31cd 100644 --- a/job.c +++ b/job.c @@ -44,7 +44,7 @@ struct joblist all_jobs = LIST_HEAD_INITIALIZER(all_jobs); struct job * job_run(const char *cmd, struct session *s, const char *cwd, job_update_cb updatecb, job_complete_cb completecb, job_free_cb freecb, - void *data) + void *data, int flags) { struct job *job; struct environ *env; @@ -111,6 +111,7 @@ job_run(const char *cmd, struct session *s, const char *cwd, job = xmalloc(sizeof *job); job->state = JOB_RUNNING; + job->flags = flags; job->cmd = xstrdup(cmd); job->pid = pid; -- cgit