diff --git a/src/gen/mkillum.c b/src/gen/mkillum.c index e37e98e27..4fa227c9f 100644 --- a/src/gen/mkillum.c +++ b/src/gen/mkillum.c @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: mkillum.c,v 2.42 2016/09/15 22:34:41 greg Exp $"; +static const char RCSid[] = "$Id: mkillum.c,v 2.43 2020/07/20 15:54:29 greg Exp $"; #endif /* * Make illum sources for optimizing rendering process @@ -177,7 +177,9 @@ quit(ec) /* make sure exit is called */ int ec; { if (ray_pnprocs > 0) /* close children if any */ - ray_pclose(0); + ray_pclose(0); + else if (ray_pnprocs < 0) + _exit(ec); /* avoid flush() in child */ exit(ec); } diff --git a/src/rt/rcontrib.c b/src/rt/rcontrib.c index 42a3cdbd1..9c029a4ca 100644 --- a/src/rt/rcontrib.c +++ b/src/rt/rcontrib.c @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: rcontrib.c,v 2.35 2019/04/07 16:39:39 greg Exp $"; +static const char RCSid[] = "$Id: rcontrib.c,v 2.36 2020/07/20 15:54:29 greg Exp $"; #endif /* * Accumulate ray contributions for a set of materials @@ -179,6 +179,8 @@ quit( /* quit program */ { if (nchild > 0) /* close children if any */ end_children(code != 0); + else if (nchild < 0) + _exit(code); /* avoid flush() in child */ exit(code); } diff --git a/src/rt/rtrace.c b/src/rt/rtrace.c index 59a11e781..a39bd6a38 100644 --- a/src/rt/rtrace.c +++ b/src/rt/rtrace.c @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: rtrace.c,v 2.98 2020/06/16 17:58:11 greg Exp $"; +static const char RCSid[] = "$Id: rtrace.c,v 2.99 2020/07/20 15:54:29 greg Exp $"; #endif /* * rtrace.c - program and variables for individual ray tracing. @@ -92,8 +92,10 @@ quit( /* quit program */ { if (ray_pnprocs > 0) /* close children if any */ ray_pclose(0); + else if (ray_pnprocs < 0) + _exit(code); /* avoid flush() in child */ #ifndef NON_POSIX - else if (!ray_pnprocs) { + else { headclean(); /* delete header file */ pfclean(); /* clean up persist files */ } diff --git a/src/util/ranimove.c b/src/util/ranimove.c index c0bff7095..c0304e253 100644 --- a/src/util/ranimove.c +++ b/src/util/ranimove.c @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: ranimove.c,v 3.18 2016/04/18 22:39:13 greg Exp $"; +static const char RCSid[] = "$Id: ranimove.c,v 3.19 2020/07/20 15:54:29 greg Exp $"; #endif /* * Radiance object animation program @@ -193,7 +193,9 @@ void quit(int ec) /* make sure exit is called */ { if (ray_pnprocs > 0) /* close children if any */ - ray_pclose(0); + ray_pclose(0); + else if (ray_pnprocs < 0) + _exit(ec); /* avoid flush in child */ exit(ec); } diff --git a/src/util/rsensor.c b/src/util/rsensor.c index b307f757c..5b84c5ab9 100644 --- a/src/util/rsensor.c +++ b/src/util/rsensor.c @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: rsensor.c,v 2.18 2015/06/09 21:34:15 greg Exp $"; +static const char RCSid[] = "$Id: rsensor.c,v 2.19 2020/07/20 15:54:29 greg Exp $"; #endif /* @@ -77,7 +77,9 @@ quit(ec) /* make sure exit is called */ int ec; { if (ray_pnprocs > 0) /* close children if any */ - ray_pclose(0); + ray_pclose(0); + else if (ray_pnprocs < 0) + _exit(ec); /* avoid flush in child */ exit(ec); }