Fix pthread_kill_test flake on qemu

This commit is contained in:
Justine Tunney 2024-08-16 21:18:26 -07:00
parent 732554ce3a
commit 098638cc6c
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
3 changed files with 20 additions and 16 deletions

View file

@ -17,6 +17,7 @@
PERFORMANCE OF THIS SOFTWARE.
*/
#include "libc/calls/calls.h"
#include "libc/dce.h"
#include "libc/errno.h"
#include "libc/fmt/itoa.h"
#include "libc/runtime/runtime.h"
@ -31,6 +32,8 @@ void CheckForFileLeaks(void) {
char *p = msg;
char *pe = msg + 256;
bool gotsome = false;
if (IsQemuUser())
usleep(1); // weird qemu mt flake
for (int fd = 3; fd < MIN_CLANDESTINE_FD; ++fd) {
if (fcntl(fd, F_GETFL) != -1) {
if (!gotsome) {