From: Ivan Maidanski Date: Thu, 22 Feb 2018 21:34:39 +0000 (+0300) Subject: Report errno in case of sem_wait failure in GC_pthread_create X-Git-Tag: v8.0.0~332 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=003470047cd1873080657dcb821d02cb806409b4;p=gc Report errno in case of sem_wait failure in GC_pthread_create Issue #97 (bdwgc). * pthread_support.c (WRAP_FUNC(pthread_create)): Change ABORT() for "sem_wait failed" case to ABORT_ARG1() to report errno as well. --- diff --git a/pthread_support.c b/pthread_support.c index 31066e77..935db034 100644 --- a/pthread_support.c +++ b/pthread_support.c @@ -1908,7 +1908,8 @@ STATIC void * GC_start_routine(void * arg) DISABLE_CANCEL(cancel_state); /* pthread_create is not a cancellation point. */ while (0 != sem_wait(&(si -> registered))) { - if (EINTR != errno) ABORT("sem_wait failed"); + if (EINTR != errno) + ABORT_ARG1("sem_wait failed", ": errcode= %d", errno); } RESTORE_CANCEL(cancel_state); }