[klibc] a little help w/ sys_clone
christophe varoqui
christophe.varoqui at free.fr
Tue Sep 21 02:02:25 PDT 2004
> clone() doesn't work on IA64 because of the way that architecture
> handles the stack, it only has clone2().
>
How does it impact the correctness of the following snippet on IA64 ?
#include <sched.h>
#include <linux/unistd.h>
#define __NR_sys_clone __NR_clone
static inline _syscall2(int,sys_clone, int,flag, void*,stack);
int main(void)
{
int pid;
pid = sys_clone(CLONE_NEWNS, 0);
if (pid < 0)
exit(1);
if (pid > 0)
exit(0);
/* in child */
return 0;
}
> Note: klibc is not multithreaded.
>
Yes, not that annoying : only the multipah daemon is threaded and it
doesn't need to run early.
regards,
--
christophe varoqui <christophe.varoqui at free.fr>
More information about the klibc
mailing list