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

Comparing ray/src/common/unix_process.c (file contents):
Revision 3.18 by greg, Tue May 16 20:58:07 2023 UTC vs.
Revision 3.19 by greg, Tue Jun 4 21:47:55 2024 UTC

# Line 129 | Line 129 | close_processes(       /* close pipes and wait for processes
129  
130          for (i = 0; i < nproc; i++)             /* close pipes, first */
131                  if (pd[i].flags & PF_RUNNING) {
132 <                        close(pd[i].w);
133 <                        close(pd[i].r);
132 >                        if (pd[i].w >= 0) close(pd[i].w);
133 >                        if (pd[i].r >= 0) close(pd[i].r);
134                          pd[i].flags &= ~PF_RUNNING;
135                  } else
136                          togo -= (pd[i].pid < 0);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines