Skip to content

Commit

Permalink
Use APR_TIMEUP for ETIMEDOUT too
Browse files Browse the repository at this point in the history
... in apr_proc_mutex_timedlock().

Related to PR53906

AIX manpage:

       ETIMEDOUT
            The time specified by the Timeout parameter expired before the requested operations could be completed.

 (no EAGAIN)



git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1920113 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
covener committed Aug 21, 2024
1 parent 5010720 commit e8e615d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
-*- coding: utf-8 -*-
Changes for APR 2.0.0

*) apr_proc_mutex_timedlock() should return APR_TIMEUP on systems
where semtimedop() returns ETIMEDOUT rather than
EAGAIN. Likely AIX-only. [Eric Covener]

*) apr_ldap: Add the new APR LDAP API. [Graham Leggett]

*) Add APR_OFF_MAX to give the maximum value of apr_off_t. [Graham
Expand Down
2 changes: 1 addition & 1 deletion locks/unix/proc_mutex.c
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ static apr_status_t proc_mutex_sysv_timedacquire(apr_proc_mutex_t *mutex,
&reltime);
} while (rc < 0 && errno == EINTR);
if (rc < 0) {
if (errno == EAGAIN) {
if (errno == EAGAIN || errno == ETIMEDOUT) {
return APR_TIMEUP;
}
return errno;
Expand Down

0 comments on commit e8e615d

Please sign in to comment.