Skip to content

Commit

Permalink
Merge r1920113 from trunk:
Browse files Browse the repository at this point in the history
Use APR_TIMEUP for ETIMEDOUT too

... 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/branches/1.8.x@1920114 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
covener committed Aug 21, 2024
1 parent 12c7397 commit 15cc371
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 1.8.0

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

*) apr_getopt: Fix error message. The "-" is the invalid character, not
the empty string. [Daniel Sahlberg]

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 @@ -396,7 +396,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 15cc371

Please sign in to comment.