diff options
| author | xin.ouyang@windriver.com <xin.ouyang@windriver.com> | 2012-11-12 09:39:46 +0000 | 
|---|---|---|
| committer | Joe MacDonald <joe.macdonald@windriver.com> | 2012-11-19 11:18:30 -0500 | 
| commit | b69b6e04f12b2fc45a3ebac8c741bda41fea6409 (patch) | |
| tree | f91300ff9c5c6b506a20d1eb7a46633bf79c6fc1 /meta-networking/recipes-support/netperf/files/vfork.patch | |
| parent | 5955e22f6ecf0196a129c27641c6d85820f8b962 (diff) | |
| download | meta-openembedded-b69b6e04f12b2fc45a3ebac8c741bda41fea6409.tar.gz | |
netperf: import from oe-classic and upgrade to 2.6.0
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
Diffstat (limited to 'meta-networking/recipes-support/netperf/files/vfork.patch')
| -rw-r--r-- | meta-networking/recipes-support/netperf/files/vfork.patch | 58 | 
1 files changed, 58 insertions, 0 deletions
| diff --git a/meta-networking/recipes-support/netperf/files/vfork.patch b/meta-networking/recipes-support/netperf/files/vfork.patch new file mode 100644 index 0000000000..eff98bfdee --- /dev/null +++ b/meta-networking/recipes-support/netperf/files/vfork.patch | |||
| @@ -0,0 +1,58 @@ | |||
| 1 | Subject: [PATCH] netperf: fix vfork/fork | ||
| 2 | |||
| 3 | Upstream-Status: Pending | ||
| 4 | |||
| 5 | Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com> | ||
| 6 | --- | ||
| 7 | src/netserver.c | 12 ++++++++++-- | ||
| 8 | 1 files changed, 10 insertions(+), 2 deletions(-) | ||
| 9 | |||
| 10 | diff --git a/src/netserver.c b/src/netserver.c | ||
| 11 | index 379a106..f6a8b09 100644 | ||
| 12 | --- a/src/netserver.c | ||
| 13 | +++ b/src/netserver.c | ||
| 14 | @@ -1020,7 +1020,7 @@ process_requests() | ||
| 15 | void | ||
| 16 | spawn_child() { | ||
| 17 | |||
| 18 | -#if defined(HAVE_FORK) | ||
| 19 | +#if defined(HAVE_FORK) || defined(HAVE_VFORK) | ||
| 20 | |||
| 21 | if (debug) { | ||
| 22 | fprintf(where, | ||
| 23 | @@ -1038,7 +1038,11 @@ spawn_child() { | ||
| 24 | |||
| 25 | signal(SIGCLD,SIG_IGN); | ||
| 26 | |||
| 27 | +#if defined(HAVE_FORK) | ||
| 28 | switch (fork()) { | ||
| 29 | +#else | ||
| 30 | + switch (vfork()) { | ||
| 31 | +#endif | ||
| 32 | case -1: | ||
| 33 | fprintf(where, | ||
| 34 | "%s: fork() error %s (errno %d)\n", | ||
| 35 | @@ -1405,7 +1409,7 @@ scan_netserver_args(int argc, char *argv[]) { | ||
| 36 | |||
| 37 | void | ||
| 38 | daemonize() { | ||
| 39 | -#if defined(HAVE_FORK) | ||
| 40 | +#if defined(HAVE_FORK) || defined(HAVE_VFORK) | ||
| 41 | |||
| 42 | if (debug) { | ||
| 43 | fprintf(where, | ||
| 44 | @@ -1419,7 +1423,11 @@ daemonize() { | ||
| 45 | fflush(stdout); | ||
| 46 | fflush(stderr); | ||
| 47 | |||
| 48 | +#if defined(HAVE_FORK) | ||
| 49 | switch (fork()) { | ||
| 50 | +#else | ||
| 51 | + switch (vfork()) { | ||
| 52 | +#endif | ||
| 53 | case -1: | ||
| 54 | fprintf(stderr, | ||
| 55 | "%s: fork() error %s (errno %d)\n", | ||
| 56 | -- | ||
| 57 | 1.7.1.1 | ||
| 58 | |||
