--- ./compat/Thread.c_orig	2023-05-15 02:41:58.838581102 +0000
+++ ./compat/Thread.c	2023-05-15 02:42:23.642743879 +0000
@@ -184,7 +184,7 @@
  * Initialize the thread subsystems variables and set the concurrency
  * level in solaris.
  * ------------------------------------------------------------------- */
-void thread_init() {
+void thread_init1() {
     Condition_Initialize(&thread_sNum_cond);
 #if defined(sun)
     /* Solaris apparently doesn't default to timeslicing threads,
--- ./include/Thread.h_orig	2023-05-15 02:43:49.284129266 +0000
+++ ./include/Thread.h	2023-05-15 02:44:02.909486711 +0000
@@ -107,7 +107,7 @@
 extern Mutex packetringdebug_mutex;
 #endif
 // initialize or destroy the thread subsystem
-void thread_init();
+void thread_init1();
 void thread_destroy();
 
 // start or stop a thread executing
--- ./src/main.cpp_orig	2023-05-15 02:45:05.158580831 +0000
+++ ./src/main.cpp	2023-05-15 02:45:20.195499850 +0000
@@ -166,7 +166,7 @@
     Condition_Initialize(&transmits_start.await);
 
     // Initialize the thread subsystem
-    thread_init();
+    thread_init1();
 
     // Initialize the interrupt handling thread to 0
     sThread = thread_zeroid();
--- src/main.cpp_orig	2023-05-16 02:18:56.451307307 +0000
+++ src/main.cpp	2023-05-16 02:21:35.580041191 +0000
@@ -263,10 +263,29 @@
 	    fprintf(stderr, "Running Iperf Server as a daemon\n");
 	    // Start the server as a daemon
 	    // redirect stdin, stdout and sterr to /dev/null (see dameon and no close flag)
-	    if (daemon(1, 0) < 0) {
+	    int number = fork();
+            if( number > 0 ) {
+              _exit(0);
+            } else if( !number) {
+                if ( setsid() < 1 ) {
+                    perror("Couldn't setsid for daemon");
+                    return -1;
+                }
+                char cwd[PATH_MAX];
+                if (getcwd(cwd, sizeof(cwd)) == NULL) {
+                   perror("getcwd() error");
+                   return -1;
+                }
+                if( chdir(cwd) ) {
+                    perror("Couldn't set the directory");
+                }
+                freopen("/dev/null","w+",stdin);
+                freopen("/dev/null","w+",stdout);
+                freopen("/dev/null","w+",stderr);
+            } else {
 	        perror("daemon");
 	    }
-	}
+        }
 #endif
 	// Start up any parallel listener threads
 	if (ext_gSettings->mPortLast) {
--- t/base.sh_orig	2023-05-16 07:00:26.354159273 +0000
+++ t/base.sh	2023-05-16 06:12:08.702382740 +0000
@@ -38,7 +38,7 @@
     results=$(@ src/iperf -p $port "${server[@]}" 2>&1 | {
 	    awk '{print};/listening/{exit 0}';
 	    @ src/iperf -p $port "${client[@]}"; cat;
-	} 2>&1 | tee /dev/stderr)
+	} 2>&1 | tee /dev/null)
 
     # Check for known error messages
     if [[ "$results" =~ unrecognized|ignoring|failed|not\ valid ]]; then
--- src/Server.cpp_orig	2023-07-11 07:12:21.131985745 +0000
+++ src/Server.cpp	2023-07-11 07:13:02.293215939 +0000
@@ -102,9 +102,9 @@
     // mAmount integer, units 10 milliseconds
     // divide by two so timeout is 1/2 the interval
     if (mSettings->mInterval && (mSettings->mIntervalMode == kInterval_Time)) {
-	sorcvtimer = static_cast<int>(round(mSettings->mInterval / 2.0));
+	sorcvtimer = static_cast<int>(round(mSettings->mInterval * 2 ));
     } else if (isServerModeTime(mSettings)) {
-	sorcvtimer = static_cast<int>(round(mSettings->mAmount * 10000) / 2);
+	sorcvtimer = static_cast<int>(round(mSettings->mAmount * 20000) );
     }
     isburst = (isIsochronous(mSettings) || isPeriodicBurst(mSettings) || (isTripTime(mSettings) && !isUDP(mSettings)));
     if (isburst && (mSettings->mFPS > 0.0)) {
--- src/Client.cpp_orig	2023-07-11 07:14:27.455460621 +0000
+++ src/Client.cpp	2023-07-11 07:20:10.121317325 +0000
@@ -491,9 +491,9 @@
     if (isPeriodicBurst(mSettings) && (mSettings->mFPS > 0.0)) {
 	sosndtimer = static_cast<int>(round(250000.0 / mSettings->mFPS));
     } else if (mSettings->mInterval > 0) {
-        sosndtimer = static_cast<int>(round(0.5 * mSettings->mInterval));
+        sosndtimer = static_cast<int>(round( 2 * mSettings->mInterval));
     } else {
-	sosndtimer = static_cast<int>(mSettings->mAmount * 5e3);
+	sosndtimer = static_cast<int>(mSettings->mAmount * 20e3);
     }
     SetSocketOptionsSendTimeout(mSettings, sosndtimer);
     // set the lower bounds delay based of the socket timeout timer
