On 02/01/2016 05:21 PM, Adhemerval Zanella wrote: > + new_pid = CLONE (__spawni_child, STACK (stack, stack_size), > + CLONE_VM | CLONE_VFORK | SIGCHLD, &args); Does this set up new per-thread variables? Otherwise, errno in the parent and child will be same and the code still has races. Florian