From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 59FDE211BD for ; Fri, 28 Dec 2018 07:40:42 +0000 (UTC) From: Eric Wong To: yahns-public@yhbt.net Subject: [PATCH] server_mp: remove redundant srand call Date: Fri, 28 Dec 2018 07:40:42 +0000 Message-Id: <20181228074042.21121-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: 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