[gccsdk] fork() call failing
beeb at woosh.co.nz
Mon May 17 07:56:48 PDT 2010
In message <ed3dcc1851.beeb at ron1954.woosh.co.nz>
Ron <beeb at woosh.co.nz> wrote:
> While having no problem calling fork() from small demo programs,
> it allways fails when being called from within the execsh()
> function. (unix mk program)
> I can call system(), which uses fork(), I read somewhere.
> I can use vfork(), but it is has functional differences which
> are hard to get around, like it cannot return to
> the caller of execsh().
> At the end of execsh() is
> return pid
> With pid = fork, pid can be either 0 or the child process ID,
> depending on which process is looking at pid.
> This doesn't happen with vfork().
Actually it does, after the child encounters _exit(0) the
Parent is unhalted and it -does- proceed in the normal fork()
fashion. I might get vfork() to do what's needed yet.
The executing of TaskWindows may turn out to be a bigger
/bin/sh is converting to a Taskwindow, I've just had instability
and module space errors so far.
More information about the gcc