* [PATCH] server_mp: remove redundant srand call
@ 2018-12-28 7:40 Eric Wong
0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2018-12-28 7:40 UTC (permalink / raw)
To: yahns-public
Ruby itself has tests for RNG reseeding at fork, so no need for
belt-and-suspenders code on our end.
---
lib/yahns/server_mp.rb | 2 --
1 file changed, 2 deletions(-)
diff --git a/lib/yahns/server_mp.rb b/lib/yahns/server_mp.rb
index 7b2f9b7..8752a08 100644
--- a/lib/yahns/server_mp.rb
+++ b/lib/yahns/server_mp.rb
@@ -31,8 +31,6 @@ def worker_atfork_internal(worker)
# daemon_pipe may be true for non-initial workers
@daemon_pipe = @daemon_pipe.close if @daemon_pipe.respond_to?(:close)
- srand # in case this pops up again: https://bugs.ruby-lang.org/issues/4338
-
# The OpenSSL PRNG is seeded with only the pid, and apps with frequently
# dying workers can recycle pids
OpenSSL::Random.seed(rand.to_s) if defined?(OpenSSL::Random)
--
EW
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2018-12-28 7:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-28 7:40 [PATCH] server_mp: remove redundant srand call Eric Wong
Code repositories for project(s) associated with this public inbox
https://yhbt.net/yahns.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).