about summary refs log tree commit diff
path: root/intl/tst-codeset.c
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2021-08-03 16:33:29 -0400
committerDJ Delorie <dj@redhat.com>2021-08-04 15:33:21 -0400
commitac30324c67d94696fdb0799e9d4fc51dc70d490b (patch)
tree5f20415a57ead411db07f887ad0b6107539cddca /intl/tst-codeset.c
parentb17e842a60819098d2a203ecc8b8371b7e1d6c65 (diff)
downloadglibc-ac30324c67d94696fdb0799e9d4fc51dc70d490b.tar.gz
glibc-ac30324c67d94696fdb0799e9d4fc51dc70d490b.tar.xz
glibc-ac30324c67d94696fdb0799e9d4fc51dc70d490b.zip
test-dlclose-exit-race: avoid hang on pthread_create error
This test depends on the "last" function being called in a
different thread than the "first" function, as "last" posts
a semaphore that "first" is waiting on.  However, if pthread_create
fails - for example, if running in an older container before
the clone3()-in-container-EPERM fixes - exit() is called in the
same thread as everything else, the semaphore never gets posted,
and first hangs.

The fix is to pre-post that semaphore before a single-threaded
exit.

Reviewed-by: Arjun Shankar <arjun@redhat.com>
Diffstat (limited to 'intl/tst-codeset.c')
0 files changed, 0 insertions, 0 deletions