mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-10-11 16:49:22 +00:00
Use pid and ppid to XOR the seed value for random and rand48.
This commit is contained in:
+2
-2
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user