Use pid and ppid to XOR the seed value for random and rand48.

This commit is contained in:
rakshasa
2013-08-16 16:29:59 +09:00
parent 412a2f79b9
commit 6697806185
+2 -2
View File
@@ -189,8 +189,8 @@ main(int argc, char** argv) {
control = new Control;
srandom(cachedTime.usec());
srand48(cachedTime.usec());
srandom(cachedTime.usec() ^ (getpid() << 16) ^ getppid());
srand48(cachedTime.usec() ^ (getpid() << 16) ^ getppid());
SignalHandler::set_ignore(SIGPIPE);
SignalHandler::set_handler(SIGINT, sigc::mem_fun(control, &Control::receive_normal_shutdown));