aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-connectivity/netperf/netperf-2.4.4/vfork.patch
blob: dbef553a19f7d216a7d8a865c13688882afe98c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
If HAVE_FORK is defined, use fork().
Otherwise, use vfork() instead.

Derived from OpenEmbedded project

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>

Upstream-Status: Pending

--- netperf-2.4.4/src/netserver.c	2007-10-17 17:09:12.000000000 -0400
+++ netperf-2.4.4.new/src/netserver.c	2011-01-23 12:26:39.000000000 -0500
@@ -567,7 +567,11 @@
   fflush (stdin);
   fflush (stdout);
   fflush (stderr);
+#if defined(HAVE_FORK)
   switch (fork())
+#else
+  switch (vfork())
+#endif
     {
     case -1:  	
       perror("netperf server error");
@@ -712,7 +716,11 @@
 #else
       signal(SIGCLD, SIG_IGN);
 	  
+#if defined(HAVE_FORK)
 	  switch (fork())
+#else
+	  switch (vfork())
+#endif
 	    {
 	    case -1:
 	      /* something went wrong */