version 1.99, 2006/01/04 20:56:05 |
version 1.100, 2006/01/04 21:25:03 |
Line 3541 JobTokenAdd(void) |
|
Line 3541 JobTokenAdd(void) |
|
void |
void |
Job_ServerStart(int maxproc) |
Job_ServerStart(int maxproc) |
{ |
{ |
int i, flags; |
int i, fd, flags; |
char jobarg[64]; |
char jobarg[64]; |
|
|
if (pipe(job_pipe) < 0) |
if (pipe(job_pipe) < 0) |
Fatal("error in pipe: %s", strerror(errno)); |
Fatal("error in pipe: %s", strerror(errno)); |
|
|
|
for (i = 0; i < 2; i++) { |
|
/* Avoid using low numbered fds */ |
|
fd = fcntl(job_pipe[i], F_DUPFD, 15); |
|
if (fd != -1) { |
|
close(job_pipe[i]); |
|
job_pipe[i] = fd; |
|
} |
|
} |
|
|
/* |
/* |
* We mark the input side of the pipe non-blocking; we poll(2) the |
* We mark the input side of the pipe non-blocking; we poll(2) the |
* pipe when we're waiting for a job token, but we might lose the |
* pipe when we're waiting for a job token, but we might lose the |