yahns Ruby server user/dev discussion
 help / color / mirror / code / Atom feed
* [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)

^ permalink raw reply	[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

yahns Ruby server user/dev discussion

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhbt.net/yahns-public
	git clone --mirror http://ou63pmih66umazou.onion/yahns-public

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 yahns-public yahns-public/ https://yhbt.net/yahns-public \
		yahns-public@yhbt.net yahns-public@rubyforge.org
	public-inbox-index yahns-public

Example config snippet for mirrors.
Newsgroups are available over NNTP:
 note: .onion URLs require Tor: https://www.torproject.org/

code repositories for project(s) associated with this inbox:


AGPL code for this site: git clone http://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/public-inbox.git