[uClibc]Problem with vfork() followed by exec() on Coldfire MCF5272

David McCullough davidm at lineo.com
Fri Sep 14 00:01:29 UTC 2001


Jivin Erik Andersen lays it down ...
> On Thu Sep 13, 2001 at 03:02:51PM +0000, David Neale wrote:
> > Hi Erik,
> > 
> > Thanks for you reply to my SOS.
> > 
> > FYI:
> > 
> > 1. I looked for vfork in the version of libc provided with the kernel 
> > distribution (I have been using the latest experimental release from 
> > http://www.uclinux.org/ports/coldfire/binary.html and downloaded it again the 
> > day before yesterday to make sure I was up to date.)   It is not in libc (nm 
> > libc | grep vfork returns nothing).   I haven't looked in more detail, but 
> > maybe it is implemented somewhere using a macro (guess it must be as sash 
> > works)?
> 
> How about 'grep -r vfork'?  vfork was a macro until recent uClibc versions,
> so nm would not show its presence, though grep would,

It was definitely a macro in the coldfire tree for all current releases.
We have converted it to use the same mechanism as uClibc now so the next
public release will have it implemented in asm.

I just remembered there was a bug fix to the vfork parent/child
interaction in the kernel.  The best way to test if this is your problem
is to try something like adding a "sleep(2)" to the small process you exec.
There was timing problems if the child exited before the parent woke up.

If this works I'll dig out a patch for you.

Some examples of vfork/exec can be in user/init/simpleinit.c,
specifically the do_single routine,  altough the do_rcfile and spawn
functions are also fairly close to what you want.

Cheers,
Davidm

-- 
David McCullough:  Ph: +61 7 3435 2815  Lineo (Where Open Meets Smart)
davidm at lineo.com   Fx: +61 7 3891 3630  825 Stanley St., W'gabba QLD 4102, Oz





More information about the uClibc mailing list