First, thank you for your checking! The lockpthread_mutex_lock(&fakeMutex); is not released after the program exit if the relevant branch conditions satisfy. Although it does not affect much, it is worth fixing for good software quality. The fix is to insert pthread_mutex_unlock(&fakeMutex); beforeexit(1).
Dear developers:
First, thank you for your checking! The lock
pthread_mutex_lock(&fakeMutex);
is not released after the program exit if the relevant branch conditions satisfy. Although it does not affect much, it is worth fixing for good software quality. The fix is to insertpthread_mutex_unlock(&fakeMutex);
beforeexit(1)
.https://github.com/wolfcw/libfaketime/blob/8ae4c9bc0eaa80cd99cc3acdc001ee8bd8ac5800/test/timetest.c#L81
https://github.com/wolfcw/libfaketime/blob/8ae4c9bc0eaa80cd99cc3acdc001ee8bd8ac5800/test/timetest.c#L103
https://github.com/wolfcw/libfaketime/blob/8ae4c9bc0eaa80cd99cc3acdc001ee8bd8ac5800/test/timetest.c#L83
https://github.com/wolfcw/libfaketime/blob/8ae4c9bc0eaa80cd99cc3acdc001ee8bd8ac5800/test/timetest.c#L105
The relevant code is shown here.
Best,