mirror of
https://github.com/tmux/tmux.git
synced 2025-09-02 21:56:57 +00:00
Sync OpenBSD patchset 384:
Switch run-shell over to queue the command in the background like #().
This commit is contained in:
12
server.c
12
server.c
@ -1,4 +1,4 @@
|
||||
/* $Id: server.c,v 1.204 2009-10-12 00:21:08 tcunha Exp $ */
|
||||
/* $Id: server.c,v 1.205 2009-10-12 00:25:25 tcunha Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||
@ -813,13 +813,17 @@ void
|
||||
server_check_jobs(void)
|
||||
{
|
||||
struct job *job;
|
||||
|
||||
|
||||
restart:
|
||||
SLIST_FOREACH(job, &all_jobs, lentry) {
|
||||
if (job->flags & JOB_DONE || job->fd != -1 || job->pid != -1)
|
||||
continue;
|
||||
if (job->callbackfn != NULL)
|
||||
job->callbackfn(job);
|
||||
job->flags |= JOB_DONE;
|
||||
|
||||
if (job->callbackfn != NULL) {
|
||||
job->callbackfn(job);
|
||||
goto restart; /* could be freed by callback */
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user