What are the flags for the linux function clone to obtain the same behaviour as pthread_create? I have tried several solutions but all gives me differents pid and not only one like with pthread_create. I have tried CLONE_SIGHAND|CLONE_FS|CLONE_VM|CLONE_FILES | SIGCHLD but when I run the task manager I see different tasks for every thread and not only one task like with pthread_create. I think that pthread_create use clone to create threads.