diff options
-rw-r--r-- | BitKeeper/etc/logging_ok | 1 | ||||
-rw-r--r-- | mysys/my_pthread.c | 11 |
2 files changed, 10 insertions, 2 deletions
diff --git a/BitKeeper/etc/logging_ok b/BitKeeper/etc/logging_ok index 894bad3d0c4..5bc690d4061 100644 --- a/BitKeeper/etc/logging_ok +++ b/BitKeeper/etc/logging_ok @@ -23,3 +23,4 @@ serg@sergbook.mysql.com sinisa@rhols221.adsl.netsonic.fi zak@balfor.local monty@narttu. +monty@mashka.mysql.fi diff --git a/mysys/my_pthread.c b/mysys/my_pthread.c index b9b05e21375..696b62f8b0e 100644 --- a/mysys/my_pthread.c +++ b/mysys/my_pthread.c @@ -416,8 +416,15 @@ int my_pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex, struct timespec *abstime) { - int error=pthread_cond_timedwait(cond,mutex,abstime); - return (error == EAGAIN || error == -1) ? ETIMEDOUT : error; + int error=pthread_cond_timedwait(cond, mutex, abstime); + if (error == -1) /* Safety if the lib is fixed */ + { + if (!(error=errno)) + error= ETIMEDOUT; /* Can happen on HPUX */ + } + if (error == EAGAIN) /* Correct errno to Posix */ + error= ETIMEDOUT; + return error; } #endif /* HAVE_BROKEN_PTHREAD_COND_TIMEDWAIT */ |