--- ray/src/rt/rc3.c 2012/06/19 00:12:08 2.12 +++ ray/src/rt/rc3.c 2012/06/22 21:58:45 2.16 @@ -1,14 +1,13 @@ #ifndef lint -static const char RCSid[] = "$Id: rc3.c,v 2.12 2012/06/19 00:12:08 greg Exp $"; +static const char RCSid[] = "$Id: rc3.c,v 2.16 2012/06/22 21:58:45 greg Exp $"; #endif /* * Accumulate ray contributions for a set of materials * Controlling process for multiple children */ +#include #include "rcontrib.h" -#include "platform.h" -#include "rtprocess.h" #include "selcall.h" #define MAXIQ (int)(PIPE_BUF/(sizeof(FVECT)*2)) @@ -321,8 +320,10 @@ end_children(int immed) while (nchild > 0) { nchild--; +#ifdef SIGKILL if (immed) /* error mode -- quick exit */ kill(kida[nchild].pr.pid, SIGKILL); +#endif if ((status = close_process(&kida[nchild].pr)) > 0 && !immed) { sprintf(errmsg, "rendering process returned bad status (%d)", @@ -539,8 +540,9 @@ feeder_loop() lastray += kida[i].nr = ninq; ninq = 0; } - for (i = nchild; i--; ) { /* get results */ - close(kida[i].pr.w); + memset(orgdir, 0, sizeof(FVECT)*2); /* get results */ + for (i = nchild; i--; ) { + writebuf(kida[i].pr.w, (char *)orgdir, sizeof(FVECT)*2); queue_results(i); } if (recover) /* and from before? */