[Buildroot] [PATCH 1/2] iperf: fix build on !MMU platforms
Peter Korsgaard
jacmet at uclibc.org
Mon May 7 20:47:02 UTC 2012
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni at free-electrons.com> writes:
Thomas> Build tested on sh2a and blackfin architectures.
Thanks. Have you sent these patches upstream?
Thomas> ++++ b/src/Listener.cpp
Thomas> +@@ -679,7 +679,11 @@
Thomas> + pid_t pid;
Thomas> +
Thomas> + /* Create a child process & if successful, exit from the parent process */
Thomas> ++#ifndef HAVE_FORK
Thomas> ++ if ( (pid = vfork()) == -1 ) {
Thomas> ++#else
Thomas> + if ( (pid = fork()) == -1 ) {
Thomas> ++#endif
Thomas> + fprintf( stderr, "error in first child create\n");
Thomas> + exit(0);
I believe you aren't allowed to call exit() after vfork (but should use
_exit() instead).
http://unix.stackexchange.com/questions/5364/why-should-a-child-of-a-vfork-or-fork-call-exit-instead-of-exit
--
Bye, Peter Korsgaard
More information about the buildroot
mailing list