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.11 by greg, Tue Apr 19 01:15:06 2005 UTC

# Line 43 | Line 43 | static const char      RCSid[] = "$Id$";
43   *      myRay.rorg = ( ray origin point )
44   *      myRay.rdir = ( normalized ray direction )
45   *      myRay.rmax = ( maximum length, or zero for no limit )
46 < *      rayorigin(&myRay, NULL, PRIMARY, 1.0);
46 > *      rayorigin(&myRay, PRIMARY, NULL, NULL);
47   *      myRay.rno = ( my personal ray identifier )
48   *      if (ray_pqueue(&myRay) == 1)
49   *              { do something with results }
# Line 422 | Line 422 | ray_pchild(    /* process rays (never returns) */
422                          r_queue[i].parent = NULL;
423                          r_queue[i].clipset = NULL;
424                          r_queue[i].slights = NULL;
425                        r_queue[i].revf = raytrace;
425                          samplendx++;
426                          rayclear(&r_queue[i]);
427                          rayvalue(&r_queue[i]);
# Line 468 | Line 467 | ray_popen(                     /* open the specified # processes */
467                  if (r_proc[ray_pnprocs].pid < 0)
468                          error(SYSTEM, "cannot fork child process");
469                  close(p1[0]); close(p0[1]);
470 +                /*
471 +                 * Close write stream on exec to avoid multiprocessing deadlock.
472 +                 * No use in read stream without it, so set flag there as well.
473 +                 */
474 +                fcntl(p1[1], F_SETFD, FD_CLOEXEC);
475 +                fcntl(p0[0], F_SETFD, FD_CLOEXEC);
476                  r_proc[ray_pnprocs].fd_send = p1[1];
477                  r_proc[ray_pnprocs].fd_recv = p0[0];
478                  r_proc[ray_pnprocs].npending = 0;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines