On Windows, rand() was returning the same sequence on every service
execution, because srand() was initializing its state only for the
short-lived process.
/* Slllluuuuuuurrrrp! */
- gettimeofday(&now, NULL);
- srand(now.tv_sec + now.tv_usec);
crypto_init();
if(!read_server_config(&config_tree)) {
#endif
char *priority = NULL;
+ gettimeofday(&now, NULL);
+ srand(now.tv_sec + now.tv_usec);
+
if(!detach()) {
return 1;
}