/[packages]/cauldron/net-tools/current/SOURCES/net-tools-1.60-continous-flush-stdout.patch
ViewVC logotype

Contents of /cauldron/net-tools/current/SOURCES/net-tools-1.60-continous-flush-stdout.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 318 - (show annotations) (download)
Fri Jan 7 23:30:25 2011 UTC (13 years, 3 months ago) by tmb
File size: 1487 byte(s)
imported package net-tools
1 diff -up net-tools-1.60/netstat.c.continous-flush-stdout net-tools-1.60/netstat.c
2 --- net-tools-1.60/netstat.c.continous-flush-stdout 2009-08-28 10:57:12.000000000 +0200
3 +++ net-tools-1.60/netstat.c 2009-08-28 10:58:48.000000000 +0200
4 @@ -357,6 +357,12 @@ static void prg_cache_clear(void)
5 prg_cache_loaded=0;
6 }
7
8 +static void wait_continous(const int reptimer)
9 +{
10 + fflush(stdout);
11 + sleep(reptimer);
12 +}
13 +
14 static void extract_type_1_socket_inode(const char lname[], unsigned long * inode_p, int * status) {
15
16 /* If lname is of the form "socket:[12345]", extract the "12345"
17 @@ -2289,7 +2295,7 @@ int main
18 flag_not & FLAG_NUM_PORT, flag_exp);
19 if (i || !flag_cnt)
20 break;
21 - sleep(reptimer);
22 + wait_continous(reptimer);
23 }
24 #else
25 ENOSUPP("netstat.c", "FW_MASQUERADE");
26 @@ -2305,7 +2311,7 @@ int main
27
28 if(i || !flag_cnt)
29 break;
30 - sleep(reptimer);
31 + wait_continous(reptimer);
32 }
33 return(i);
34 }
35 @@ -2329,7 +2335,7 @@ int main
36 i = route_info(afname, options);
37 if (i || !flag_cnt)
38 break;
39 - sleep(reptimer);
40 + wait_continous(reptimer);
41 }
42 return (i);
43 }
44 @@ -2338,7 +2344,7 @@ int main
45 i = iface_info();
46 if (!flag_cnt || i)
47 break;
48 - sleep(reptimer);
49 + wait_continous(reptimer);
50 }
51 return (i);
52 }
53 @@ -2470,7 +2476,7 @@ int main
54 }
55 if (!flag_cnt || i)
56 break;
57 - sleep(reptimer);
58 + wait_continous(reptimer);
59 prg_cache_clear();
60 tcp_node_hash_clear();
61 }

  ViewVC Help
Powered by ViewVC 1.1.30