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

David Neale dneale at bluesocket.com
Mon Sep 10 12:24:24 UTC 2001


Help!

I'm having problems getting a vfork() followed by an exec() working in uClinux
on the Motorola Coldfire MCF5272, even with a trivial example program.

At the point of the exec something nasty happens and I get output similar to:

bad frame format: 00000000
PC: [<000b3938>]
SR: 2000  SP: 002e1e68  a2: 00000034
....
....

I have tried the following:
1. The same code runs fine on my PC (Redhat 7.1, kernel V 2.4.2)
2. A trivial program containing an exec() without a vfork() is OK.
3. Replacing the exec() by _exit(0) is fine.
4. I had a look at sash.c (which of course contains a working vfork()/exec()).
   This had signal handlers installed for SIGCHLD etc. so I tried these as
   well, in case a signal is being sent that is handled incorrectly.
   No difference.
5. I tried deleting the exec'd program from /var, and the child failed to
   execute as expected, without causing any further problem.
6. I can exec simple system calls such as ls and ps from vfork() but get
   no output from them.
7. I have tried 3 different libc libraries, which all give different
   results(!!)  The library with my uClinux distribution doesn't support
   vfork(), the one from m68k-elf falls over the moment I do an exec,
   even without a vfork, so I am using a recent uClibc at present.

Can anyone help?   In particular, is there a version of libc out there
that will solve my problem? 

Dave Neale.





More information about the uClibc mailing list