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

Comparing ray/src/rt/raypcalls.c (file contents):
Revision 2.8 by greg, Fri Sep 17 21:43:50 2004 UTC vs.
Revision 2.9 by greg, Mon Sep 20 16:26:58 2004 UTC

# Line 468 | Line 468 | ray_popen(                     /* open the specified # processes */
468                  if (r_proc[ray_pnprocs].pid < 0)
469                          error(SYSTEM, "cannot fork child process");
470                  close(p1[0]); close(p0[1]);
471 +                /*
472 +                 * Close write stream on exec to avoid multiprocessing deadlock.
473 +                 * No use in read stream without it, so set flag there as well.
474 +                 */
475 +                fcntl(p1[1], F_SETFD, FD_CLOEXEC);
476 +                fcntl(p0[0], F_SETFD, FD_CLOEXEC);
477                  r_proc[ray_pnprocs].fd_send = p1[1];
478                  r_proc[ray_pnprocs].fd_recv = p0[0];
479                  r_proc[ray_pnprocs].npending = 0;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines