[Buildroot] [PATCH] quagga: Do not use fork on noMMU platforms
yuvaraj.patil at wipro.com
yuvaraj.patil at wipro.com
Sat Jul 19 17:12:19 UTC 2014
Thank you very much for your comments.
On Friday, July 18, 2014 5:34 PM, Thomas Petazzoni wrote:
>Patches for packages should be named:
I will follow this.
> Patches must have a description + Signed-off-by line.
I could see, Signed-off line is added in patch.
I used below command sequence (blue colour) to generate a patch.
#Diff to make a code patch
diff -Nurp <package_orig> <package> > <patch_name>.patch
#Move the diff generated patch to buildroot package directory
git add <patch name>.patch
git commit -a -s
#add the comment
git format-patch -1
#edit the patch to add comments
Am I missing anything here? Please let me know so that I can take care for the next patch.
>We have already received numerous patches like this from ADI, and each time our answer was the same: please include in the patch description a justification of why the fork() call can be replaced by vfork(). I'm sure >you know that vfork() is not equivalent to fork() and that we cannot simply replace one by the other without checking carefully how
>fork() is used. With vfork(), the parent process is blocked until the child exits or calls exec(), and all changes made by the child will be visible by the parent. There are therefore many situations in which
>vfork() cannot be used as a replacement for fork().
Can you please provide us a reference example (or a sample patch) from other architectures, how the fork() issue is fixed?
Similar issue is reported for few other packages on Blackfin and a reference example will help me to fix this issue in a correct way.
From: Thomas Petazzoni [mailto:thomas.petazzoni at free-electrons.com]
Sent: Friday, July 18, 2014 5:34 PM
To: Yuvaraj Patil (WT01 - MFG & HITECH-HP-BANGALORE)
Cc: buildroot at busybox.net; adi-buildroot-devel at lists.sourceforge.net
Subject: Re: [PATCH] quagga: Do not use fork on noMMU platforms
Dear Yuvaraj Patil,
On Fri, 18 Jul 2014 17:27:43 +0530, Yuvaraj Patil wrote:
> fork() is not available in noMMU platforms, hence use vfork instead
> Signed-off-by: Yuvaraj Patil <yuvaraj.patil at wipro.com<mailto:yuvaraj.patil at wipro.com>>
> arch/Config.in | 2 +-
> package/quagga/quagga.patch | 28 ++++++++++++++++++++++++++++
> 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644
> diff --git a/arch/Config.in b/arch/Config.in index 77fae7a..9cd85a5
> --- a/arch/Config.in
> +++ b/arch/Config.in
> @@ -60,7 +60,7 @@ config BR2_avr32
> # do the lack of upstream support in the major toolchain
> # components. If you're interested by AVR32, contact the
> # Buildroot community. Otherwise, its support will be removed
> - # in 2014.11.
> + # by the 2015.02 release.
> depends on BR2_DEPRECATED_SINCE_2014_08
> The AVR32 is a 32-bit RISC microprocessor architecture designed by
This chunk is not related to quagga, so it shouldn't be part of your patch.
> diff --git a/package/quagga/quagga.patch b/package/quagga/quagga.patch
Patches for packages should be named:
> new file mode 100644
> index 0000000..2949b2c
> --- /dev/null
> +++ b/package/quagga/quagga.patch
Patches must have a description + Signed-off-by line.
> @@ -0,0 +1,28 @@
> +diff -Nurp quagga-0.99.23_orig/babeld/util.c quagga-0.99.23/babeld/util.c
> +--- quagga-0.99.23_orig/babeld/util.c 2014-07-18 15:31:02.078625470 +0530
> ++++ quagga-0.99.23/babeld/util.c 2014-07-18 15:33:45.838618612 +0530
> +@@ -430,7 +430,11 @@ daemonise()
> + fflush(stdout);
> + fflush(stderr);
> ++#ifdef HAVE_FORK
> + rc = fork();
> ++ rc = vfork();
We have already received numerous patches like this from ADI, and each time our answer was the same: please include in the patch description a justification of why the fork() call can be replaced by vfork(). I'm sure you know that vfork() is not equivalent to fork() and that we cannot simply replace one by the other without checking carefully how
fork() is used. With vfork(), the parent process is blocked until the child exits or calls exec(), and all changes made by the child will be visible by the parent. There are therefore many situations in which
vfork() cannot be used as a replacement for fork().
We therefore want to see a justification for each patch making this replacement.
Also, notice that since commit
quagga can no longer be selected on Blackfin, as I've added a MMU dependency on the package. Of course, if you're interested in seeing quagga becoming available on Blackfin, some changes are needed. If you don't care specifically about quagga on Blackfin, we can live with it being non-available in Buildroot for Blackfin.
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering http://free-electrons.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the buildroot