--- ray/src/rt/rpmain.c 2005/06/21 00:26:44 2.11 +++ ray/src/rt/rpmain.c 2008/03/11 02:21:47 2.14 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: rpmain.c,v 2.11 2005/06/21 00:26:44 greg Exp $"; +static const char RCSid[] = "$Id: rpmain.c,v 2.14 2008/03/11 02:21:47 greg Exp $"; #endif /* * rpmain.c - main for rpict batch rendering program @@ -226,8 +226,13 @@ main(int argc, char *argv[]) /* initialize object types */ initotypes(); /* initialize urand */ - srandom(rand_samp ? (long)time(0) : 0L); - initurand(2048); + if (rand_samp) { + srandom((long)time(0)); + initurand(0); + } else { + srandom(0L); + initurand(2048); + } /* set up signal handling */ sigdie(SIGINT, "Interrupt"); #ifdef SIGHUP @@ -312,10 +317,11 @@ main(int argc, char *argv[]) pflock(1); pfhold(); tstart = time((time_t *)NULL); + ambsync(); /* load new values */ } if (rval < 0) error(SYSTEM, "cannot fork child for persist function"); - pfdetach(); /* parent exits */ + pfdetach(); /* parent will run then exit */ } } runagain: @@ -436,6 +442,7 @@ printdefaults(void) /* print default values to stdou ourview.type==VT_HEM ? "hemispherical" : ourview.type==VT_ANG ? "angular" : ourview.type==VT_CYL ? "cylindrical" : + ourview.type==VT_PLS ? "planisphere" : "unknown"); printf("-vp %f %f %f\t# view point\n", ourview.vp[0], ourview.vp[1], ourview.vp[2]);