Wed Dec 17 22:59:25 UTC 2008
see the prompt back.
Looking at the sh source code, it seems that things are not done properly.
As an example, the sh will vfork, and in the child it will check if the
application you want to launch exists and will exec it.
However, if the application doesn't exist (with an invalid command for
example) execve will return a failure. BUT, from the man page:
" Formally speaking, the standard description given above
does not allow one to use vfork() since a following exec
might fail, and then what happens is undefined."
Which I suspect is failing.
Actually, changing the sh source code so the test if wether the applications
exists or not, BEFORE vfork fix the problem and we don't experience crash
But I'm still puzzled (for some unknown reasons), and I remembered the
problems you had with vfork on both ARM and i386 architecture.. What was
wrong exactly ?
Looking at your modification, you're just doing manually what the macro
syscall is doing. You call the entry points 190 (vfork) and exit returning a
Is there anything I've missed ? The current vfork in my Hitachi-SH port is
just a syscall to vfork using a macro.
Thank you for your help
Hewlett-Packard - Embedded and Personal Systems / Platform Technology Group
351 Burwood Hwy, Forest Hill, Victoria 3130 - Australia
Tel: +61 3 88773740 - Fax: +61 3 9802 7714 - mail: jean-yves_avenard at hp.com
> -----Original Message-----
> From: Manuel Novoa III [mailto:mnovoa3 at bellsouth.net]
> Sent: Saturday, 3 March 2001 3:58 AM
> To: Erik Andersen
> Cc: David McCullough; uclibc at uclibc.org
> Subject: i386 vfork bug -- was Re: [uClibc]popen failing on i386 --
> vfork issue?
> On Thu, 01 Mar 2001, Manuel Novoa III wrote:
> > call generates a SIGPIPE. What am I missing? Why should
> this work with vfork
> > at all?
> Ok... I know what was missing above. I missed the part about
> the parent
> continuing execution when the child does an execve.
> However, vfork on i386 is definitely broken. A test program
> to illustrate this
> is attached. The child executes but the parent segfaults.
> As a temporary work-around, I'm making vfork on i386 a weak
> alias for fork.
More information about the uClibc