Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37749734
en ru br
ALT Linux repos
S:1.60-alt19
5.0: 1.60-alt15
4.1: 1.60-alt13
4.0: 1.60-alt13
3.0: 1.60-alt12

Group :: System/Configuration/Networking
RPM: net-tools

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: net-tools-1.60-rh-continuous-flush-stdout.patch
Download


diff -up net-tools-1.60/netstat.c.continous-flush-stdout net-tools-1.60/netstat.c
--- net-tools-1.60/netstat.c.continous-flush-stdout	2009-08-28 10:57:12.000000000 +0200
+++ net-tools-1.60/netstat.c	2009-08-28 10:58:48.000000000 +0200
@@ -357,6 +357,12 @@ static void prg_cache_clear(void)
     prg_cache_loaded=0;
 }
 
+static void wait_continous(const int reptimer)
+{
+    fflush(stdout);
+    sleep(reptimer);
+}
+
 static void extract_type_1_socket_inode(const char lname[], unsigned long * inode_p, int * status) {
 
     /* If lname is of the form "socket:[12345]", extract the "12345"
@@ -2289,7 +2295,7 @@ int main
 			     flag_not & FLAG_NUM_PORT, flag_exp);
 	    if (i || !flag_cnt)
 		break;
-	    sleep(reptimer);
+	    wait_continous(reptimer);
 	}
 #else
 	ENOSUPP("netstat.c", "FW_MASQUERADE");
@@ -2305,7 +2311,7 @@ int main
 	
 	if(i || !flag_cnt)
 	  break;
-	sleep(reptimer);
+	wait_continous(reptimer);
       }
       return(i);
     }
@@ -2329,7 +2335,7 @@ int main
 	    i = route_info(afname, options);
 	    if (i || !flag_cnt)
 		break;
-	    sleep(reptimer);
+	    wait_continous(reptimer);
 	}
 	return (i);
     }
@@ -2338,7 +2344,7 @@ int main
 	    i = iface_info();
 	    if (!flag_cnt || i)
 		break;
-	    sleep(reptimer);
+	    wait_continous(reptimer);
 	}
 	return (i);
     }
@@ -2470,7 +2476,7 @@ int main
 	}
 	if (!flag_cnt || i)
 	    break;
-	sleep(reptimer);
+	wait_continous(reptimer);
 	prg_cache_clear();
 	tcp_node_hash_clear();
     }
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin