fork on uClinux

Shaun Jackman sjackman at
Tue May 23 23:02:33 UTC 2006

On 5/23/06, Carlos Manuel Duclos Vergara <carlos at> wrote:
> init process is handled in a special way by the kernel, since it cannot be
> forked (before init there are no other "processes" in the system).

I think we're probably saying the same thing here but using different
terms. I would say that init is not execed, since there is no process
yet -- only the kernel -- to call execve(2). init can certainly call
fork and exec though, since that's how it starts the next process (a
shell, perhaps).

> After that init should use whatever it can find to create new processes.
> Since fork is not present, I assume that it must use vfork instead (when
> you set the MMU flags in uClibc to NOMMU).

busybox's init(8) implementation calls fork(2) and never vfork(2).

> > this work? Does fork(2) return ENOSYS, or is it blindly remapped to
> > vfork(2)?
> that is a way out, however it causes more problems than solutions since
> the purpose/functionality of both calls are completely different

I agree entirely.

> actually I think that you should be more specific in your question, are
> you talking about how init creates the rest of the system? because before
> init there is almost nothing but the kernel & friends.

When busybox's init(8) implementation calls fork(2), what happens on a
uClinux system?


More information about the uClibc mailing list