ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/util/rcomb.c
(Generate patch)

Comparing ray/src/util/rcomb.c (file contents):
Revision 2.20 by greg, Tue Jun 4 21:23:11 2024 UTC vs.
Revision 2.21 by greg, Tue Jun 4 21:47:55 2024 UTC

# Line 653 | Line 653 | spawned_children(int np)
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 */
# Line 667 | Line 669 | spawned_children(int np)
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() */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines