Sync OpenBSD patchset 382:

Collect status from dead jobs and don't invoke the callback until both
all input (the socket is closed) and status is available.
This commit is contained in:
Tiago Cunha
2009-10-12 00:21:08 +00:00
parent b26ea8462e
commit 1b03bc2404
3 changed files with 38 additions and 9 deletions

6
tmux.h
View File

@ -1,4 +1,4 @@
/* $Id: tmux.h,v 1.467 2009-10-12 00:18:19 tcunha Exp $ */
/* $Id: tmux.h,v 1.468 2009-10-12 00:21:08 tcunha Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@ -565,6 +565,7 @@ ARRAY_DECL(keylist, int);
struct job {
char *cmd;
pid_t pid;
int status;
struct client *client;
@ -575,6 +576,9 @@ struct job {
void (*freefn)(void *);
void *data;
int flags;
#define JOB_DONE 0x1
RB_ENTRY(job) entry;
SLIST_ENTRY(job) lentry;
};