Skip to content

Commit

Permalink
retry pthread_create also on ENOENT (microsoft#2998)
Browse files Browse the repository at this point in the history
  • Loading branch information
wfurt authored Aug 19, 2022
1 parent 408d48c commit f405622
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/platform/platform_posix.c
Original file line number Diff line number Diff line change
Expand Up @@ -652,11 +652,11 @@ CxPlatThreadCreate(
#else // CXPLAT_USE_CUSTOM_THREAD_CONTEXT

//
// If pthread_create fails with ENOKEY, then try again without the attribute
// If pthread_create fails with ENOKEY or ENOENT, then try again without the attribute
// because the CPU might be offline.
//
if (pthread_create(Thread, &Attr, Config->Callback, Config->Context) &&
(errno != ENOKEY || pthread_create(Thread, NULL, Config->Callback, Config->Context))) {
((errno != ENOKEY && errno != ENOENT) || pthread_create(Thread, NULL, Config->Callback, Config->Context))) {
Status = errno;
QuicTraceEvent(
LibraryErrorStatus,
Expand Down

0 comments on commit f405622

Please sign in to comment.