653 |
|
} |
654 |
|
if (rv) { /* are we the parent? */ |
655 |
|
i = nchildren-1; /* last child is sole reader */ |
656 |
< |
while (i-- > 0) |
656 |
> |
while (i-- > 0) { |
657 |
|
close(cproc[i].r); |
658 |
+ |
cproc[i].r = -1; |
659 |
+ |
} |
660 |
|
return(1); /* parent return value */ |
661 |
|
} |
662 |
|
inchild = i; /* our child index */ |
669 |
|
i = inchild; /* won't read from siblings */ |
670 |
|
while (i-- > 0) |
671 |
|
close(cproc[i].r); |
672 |
< |
i = nmats; /* close input matrix streams */ |
672 |
> |
i = nmats; /* redirect input matrix streams */ |
673 |
|
while (i-- > 0) { |
674 |
|
if (mop[i].infp != stdin) |
675 |
|
fclose(mop[i].infp); /* ! pclose() */ |