Skip to content
Commit ac30324c authored by DJ Delorie's avatar DJ Delorie
Browse files

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: default avatarArjun Shankar <arjun@redhat.com>
parent b17e842a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment