version 1.91, 2007/09/29 09:59:04 |
version 1.92, 2007/10/06 19:34:32 |
|
|
job->curPos = 0; |
job->curPos = 0; |
|
|
if (outputsp == NULL || job->inPipe > outputsn) { |
if (outputsp == NULL || job->inPipe > outputsn) { |
int bytes, obytes; |
int fdn, ofdn; |
char *tmp; |
fd_set *tmp; |
|
|
bytes = howmany(job->inPipe+1, NFDBITS) * |
fdn = howmany(job->inPipe+1, NFDBITS); |
sizeof(fd_mask); |
ofdn = outputsn ? howmany(outputsn+1, NFDBITS) : 0; |
obytes = outputsn ? |
|
howmany(outputsn+1, NFDBITS) * |
|
sizeof(fd_mask) : 0; |
|
|
|
if (bytes != obytes) { |
if (fdn != ofdn) { |
tmp = realloc(outputsp, bytes); |
tmp = recalloc(outputsp, fdn, sizeof(fd_mask)); |
if (tmp == NULL) |
if (tmp == NULL) |
return; |
return; |
memset(tmp + obytes, 0, bytes - obytes); |
outputsp = tmp; |
outputsp = (fd_set *)tmp; |
|
} |
} |
outputsn = job->inPipe; |
outputsn = job->inPipe; |
} |
} |