1 // RUN: %clangxx_tsan -O1 %s -o %t && %env_tsan_opts=atexit_sleep_ms=50 %run %t 2>&1 | FileCheck %s
10 fprintf(stderr
, "CHILD ATEXIT\n");
13 void *worker(void *unused
) {
19 pthread_create(&t
, NULL
, worker
, NULL
);
24 fprintf(stderr
, "CHILD DONE\n");
27 if (waitpid(pid
, 0, 0) == -1) {
31 fprintf(stderr
, "PARENT DONE\n");
36 // CHECK: CHILD ATEXIT