version 1.182, 2018/08/18 20:08:52 |
version 1.183, 2018/08/23 15:45:05 |
|
|
char *lockfile) |
char *lockfile) |
{ |
{ |
int pair[2]; |
int pair[2]; |
struct job *job; |
|
sigset_t set, oldset; |
sigset_t set, oldset; |
struct client *c; |
struct client *c; |
char *cause = NULL; |
char *cause = NULL; |
|
|
} |
} |
|
|
start_cfg(); |
start_cfg(); |
|
|
server_add_accept(0); |
server_add_accept(0); |
|
|
proc_loop(server_proc, server_loop); |
proc_loop(server_proc, server_loop); |
|
|
LIST_FOREACH(job, &all_jobs, entry) { |
job_kill_all(); |
if (job->pid != -1) |
|
kill(job->pid, SIGTERM); |
|
} |
|
|
|
status_prompt_save_history(); |
status_prompt_save_history(); |
|
|
exit(0); |
exit(0); |
} |
} |
|
|
|
|
{ |
{ |
struct client *c; |
struct client *c; |
u_int items; |
u_int items; |
struct job *job; |
|
|
|
do { |
do { |
items = cmdq_next(NULL); |
items = cmdq_next(NULL); |
|
|
if (!TAILQ_EMPTY(&clients)) |
if (!TAILQ_EMPTY(&clients)) |
return (0); |
return (0); |
|
|
LIST_FOREACH(job, &all_jobs, entry) { |
if (job_still_running()) |
if ((~job->flags & JOB_NOWAIT) && job->state == JOB_RUNNING) |
return (0); |
return (0); |
|
} |
|
|
|
return (1); |
return (1); |
} |
} |
|
|
{ |
{ |
struct window *w, *w1; |
struct window *w, *w1; |
struct window_pane *wp; |
struct window_pane *wp; |
struct job *job; |
|
|
|
RB_FOREACH_SAFE(w, windows, &windows, w1) { |
RB_FOREACH_SAFE(w, windows, &windows, w1) { |
TAILQ_FOREACH(wp, &w->panes, entry) { |
TAILQ_FOREACH(wp, &w->panes, entry) { |
|
|
} |
} |
} |
} |
} |
} |
|
job_check_died(pid, status); |
LIST_FOREACH(job, &all_jobs, entry) { |
|
if (pid == job->pid) { |
|
job_died(job, status); /* might free job */ |
|
break; |
|
} |
|
} |
|
} |
} |
|
|
/* Handle stopped children. */ |
/* Handle stopped children. */ |