Could you test this patch? Now, there remains the question of CLONE_CHILD_SETTID and CLONE_CHILD_CLEARTID. Since we’re passing NULL for ‘ctid’, I expect that these flags have no effect at all. Conversely, libc uses these flags to update the thread ID in the child process (x86_64/arch-fork.h): --8<---------------cut here---------------start------------->8--- #define ARCH_FORK() \ INLINE_SYSCALL (clone, 4, \ CLONE_CHILD_SETTID | CLONE_CHILD_CLEARTID | SIGCHLD, 0, \ NULL, &THREAD_SELF->tid) --8<---------------cut here---------------end--------------->8--- This is certainly useful, but we’d have troubles doing it from the FFI… It may that this is fine if the process doesn’t use threads. Ludo’.