Skip to content

Commit

Permalink
feat: Added warning messages for lost rays in ray_pclose()
Browse files Browse the repository at this point in the history
  • Loading branch information
Gregungory committed Apr 6, 2024
1 parent 425d236 commit 1e84274
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/rt/raypcalls.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef lint
static const char RCSid[] = "$Id: raypcalls.c,v 2.35 2023/02/02 20:32:59 greg Exp $";
static const char RCSid[] = "$Id: raypcalls.c,v 2.36 2024/04/06 00:00:22 greg Exp $";
#endif
/*
* raypcalls.c - interface for parallel rendering using Radiance
Expand Down Expand Up @@ -520,9 +520,13 @@ ray_pclose( /* close one or more child processes */
/* check argument */
if ((nsub <= 0) | (nsub > ray_pnprocs))
nsub = ray_pnprocs;
/* clear our ray queue */
i = 0; /* clear our ray queue */
while (ray_presult(&res,0) > 0)
;
++i;
if (i) {
sprintf(errmsg, "dropped %d ray results in ray_pclose()", i);
error(WARNING, errmsg);
}
r_send_next = 0; /* hard reset in case of error */
r_recv_first = r_recv_next = RAYQLEN;
/* close send pipes */
Expand Down

0 comments on commit 1e84274

Please sign in to comment.