summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorNiko Tyni <ntyni@debian.org>2012-10-24 21:04:53 +0200
committerTobias Oetiker <tobi@oetiker.ch>2012-10-24 21:04:53 +0200
commitef24bb21f91c066129d1fbb4fb72493029a17c6a (patch)
tree7a41372896f023cb55bb3486b65648d10a6d198d /bin
parent49572f3da6f0e62adbcb3d326c698fad941164f4 (diff)
downloadsmokeping-ef24bb21f91c066129d1fbb4fb72493029a17c6a.tar.gz
smokeping-ef24bb21f91c066129d1fbb4fb72493029a17c6a.tar.xz
As spotted by Gert Doering, rand() gives the same results in each
pinger subprocess. This is because they all inherit the same RNG state from their parent. Fix this undesired behaviour by reseeding the RNG with the current time and the process ID. The argument of srand() shouldn't really matter much on modern Perls, but we're not very concerned about the quality of the random numbers either, and time()+$$ should make sure it's different for each process.
Diffstat (limited to 'bin')
0 files changed, 0 insertions, 0 deletions