6 |
|
* Controlling process for multiple children |
7 |
|
*/ |
8 |
|
|
9 |
+ |
#include <signal.h> |
10 |
|
#include "rcontrib.h" |
10 |
– |
#include "platform.h" |
11 |
|
#include "rtprocess.h" |
12 |
|
#include "selcall.h" |
13 |
|
|
321 |
|
|
322 |
|
while (nchild > 0) { |
323 |
|
nchild--; |
324 |
+ |
#ifdef SIGKILL |
325 |
|
if (immed) /* error mode -- quick exit */ |
326 |
|
kill(kida[nchild].pr.pid, SIGKILL); |
327 |
+ |
#endif |
328 |
|
if ((status = close_process(&kida[nchild].pr)) > 0 && !immed) { |
329 |
|
sprintf(errmsg, |
330 |
|
"rendering process returned bad status (%d)", |
541 |
|
lastray += kida[i].nr = ninq; |
542 |
|
ninq = 0; |
543 |
|
} |
544 |
< |
for (i = nchild; i--; ) { /* get results */ |
545 |
< |
close(kida[i].pr.w); |
544 |
> |
memset(orgdir, 0, sizeof(FVECT)*2); /* get results */ |
545 |
> |
for (i = nchild; i--; ) { |
546 |
> |
writebuf(kida[i].pr.w, (char *)orgdir, sizeof(FVECT)*2); |
547 |
|
queue_results(i); |
548 |
|
} |
549 |
|
if (recover) /* and from before? */ |