227 |
|
/* initialize object types */ |
228 |
|
initotypes(); |
229 |
|
/* initialize urand */ |
230 |
< |
initurand(2048); |
231 |
< |
srandom(rand_samp ? (long)time(0) : 0L); |
230 |
> |
if (rand_samp) { |
231 |
> |
srandom((long)time(0)); |
232 |
> |
initurand(0); |
233 |
> |
} else { |
234 |
> |
srandom(0L); |
235 |
> |
initurand(2048); |
236 |
> |
} |
237 |
|
/* set up signal handling */ |
238 |
|
sigdie(SIGINT, "Interrupt"); |
239 |
|
#ifdef SIGHUP |
309 |
|
while ((rval=fork()) == 0) { /* keep on forkin' */ |
310 |
|
pflock(1); |
311 |
|
pfhold(); |
312 |
+ |
ambsync(); /* load new values */ |
313 |
|
} |
314 |
|
if (rval < 0) |
315 |
|
error(SYSTEM, "cannot fork child for persist function"); |
316 |
< |
pfdetach(); /* parent exits */ |
316 |
> |
pfdetach(); /* parent will run then exit */ |
317 |
|
} |
318 |
|
} |
319 |
|
runagain: |