[uClibc]libpthread and vfork

Gregory Nutt spudmonkey at racsa.co.cr
Fri Jan 31 13:42:25 UTC 2003


Hi. List,

Has any experienced this:

1. Build a program that includes libpthread (before libc of course), and
2. The program calls vfork() on a uClinux system (which does not not 
support fork)

When I do this, vfork() fails with errno=ENOSYS. I believe that this 
because the libpthread replaces vfork with its own vfork:

pid_t __vfork(void)
{
   return __fork();
}
weak_alias (__vfork, vfork);

__fork in turns calls __lib_fork in libc.  The fork system call returns 
ENOSYS.  At least that is what I think happening.

Greg Nutt




More information about the uClibc mailing list