X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fexit%2Fexit.c;h=ae557c090d1793220764dc413267a4e8e29c5e35;hb=a45de0cb94b58f1b5ea4af1ca3531c56dc02c0a2;hp=1ff19dbeeb9b41ba3f9548f05a159ab63cdcacf1;hpb=f753049a50132a23849ef89a8af5ff86ad595c25;p=musl diff --git a/src/exit/exit.c b/src/exit/exit.c index 1ff19dbe..ae557c09 100644 --- a/src/exit/exit.c +++ b/src/exit/exit.c @@ -13,10 +13,10 @@ weak_alias(dummy, __fflush_on_exit); void exit(int code) { - static int lock; + static int lock[2]; /* If more than one thread calls exit, hang until _Exit ends it all */ - LOCK(&lock); + LOCK(lock); /* Only do atexit & stdio flush if they were actually used */ __funcs_on_exit();