From 616119ee22fec0f0db7a4c89a6a8f649d5926891 Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Tue, 20 Apr 2021 03:48:50 +0200 Subject: Turn random() to nrand48 in inner loop where it is not cryptographically relevant to avoid futex storm. Thanks and credits to Bart Smienk --- opentracker.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'opentracker.c') diff --git a/opentracker.c b/opentracker.c index aed8374..d2c0635 100644 --- a/opentracker.c +++ b/opentracker.c @@ -258,6 +258,9 @@ static void * server_mainloop( void * args ) { #endif if( !ws.inbuf || !ws.outbuf ) panic( "Initializing worker failed" ); + ws.rand48_state[0] = (uint16_t)random(); + ws.rand48_state[1] = (uint16_t)random(); + ws.rand48_state[2] = (uint16_t)random(); for( ; ; ) { int64 sock; -- cgit v1.2.3