fork on uClinux
dalias at aerifal.cx
Fri May 26 19:11:37 UTC 2006
On Fri, May 26, 2006 at 11:03:55AM -0600, Shaun Jackman wrote:
> On 5/25/06, Mike Frysinger <vapier at gentoo.org> wrote:
> >the uClinux guys use something simpleinit rather than init from busybox
> I have finally come to the bottom of my inquiry into uClinux and
> 1. uClinux-dist maintains a patch against busybox, which (possibly
> among other things) includes...
> >#if defined(__UCLIBC__) && !defined(__UCLIBC_HAS_MMU__)
> >#define fork vfork
> 2. uClinux-dist does not use busybox/init by default anyways, instead
> using simpleinit, which is fork/exit vfork/_exit clean.
Normally you want to use _exit instead of exit regardless of whether
you fork or vfork. Otherwise stdout (and any other streams) will be
flushed in both parent and child and the data will be written twice,
resulting in file corruption.
More information about the uClibc