[BusyBox] fork / vfork in init.c
David Meggy
dmeggy at techsol.ca
Fri Oct 22 16:03:41 UTC 2004
On Fri, 2004-10-22 at 02:57, Poul Erik Hansen wrote:
>
> Please add this patch
>
> @@ -52,6 +52,9 @@
> # include <sys/syslog.h>
> #endif
>
> +#if defined(__UCLIBC__) && !defined(__ARCH_HAS_MMU__)
> +#define fork vfork
> +#endif
>
> #define INIT_BUFFS_SIZE 256
AHHH!!!!
you can't do that. If an application needs fork and there is no mmu,
you are out of luck. vfork can only be used if the child is able to
share an address space with the parent (ie it never returns from the
function that called it). Please read the man page on vfork.
If you want to port an application to an mmuless processor then you will
have to search for every fork call and examine it individually, and
possibly modify the code to make it vfork safe. Then change that fork
to vfork.
David
--
~~~~~~~~~~~~~~~~~~~~~~~~
David Meggy
Engineering
Technical Solutions Inc.
Unit #1 7157 Honeyman St
Delta BC Canada, V4G 1E2
www.techsol.ca
eMail: dmeggy at techsol.ca
Tel: 604 946 TECH (8324)
Fax: 604 946 6445
~~~~~~~~~~~~~~~~~~~~~~~~
More information about the busybox
mailing list