version 1.2, 2009/10/10 18:42:14 |
version 1.3, 2009/10/11 07:20:16 |
|
|
job->freefn = freefn; |
job->freefn = freefn; |
job->data = data; |
job->data = data; |
|
|
|
job->flags = JOB_DONE; |
|
|
RB_INSERT(jobs, jobs, job); |
RB_INSERT(jobs, jobs, job); |
SLIST_INSERT_HEAD(&all_jobs, job, lentry); |
SLIST_INSERT_HEAD(&all_jobs, job, lentry); |
|
|
|
|
{ |
{ |
int nullfd, out[2], mode; |
int nullfd, out[2], mode; |
|
|
if (job->fd != -1) |
if (!(job->flags & JOB_DONE)) |
return (0); |
return (0); |
|
job->flags &= ~JOB_DONE; |
|
|
if (pipe(out) != 0) |
if (pipe(out) != 0) |
return (-1); |
return (-1); |