track all live threads in an AS-safe, fully-consistent linked list
[musl] / src / process / fork.c
index da074ae..11286ef 100644 (file)
@@ -27,6 +27,7 @@ pid_t fork(void)
                self->tid = __syscall(SYS_gettid);
                self->robust_list.off = 0;
                self->robust_list.pending = 0;
+               self->next = self->prev = self;
                libc.threads_minus_1 = 0;
        }
        __restore_sigs(&set);