You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reported in version: 1.2.15 Reported for operating system, platform: Linux, x86
Comments on the original bug report:
On 2012-02-19 19:01:08 +0000, wrote:
Created attachment 824
Fix to treat ETIMEDOUT as a time out instead of an error (and update the test)
Using SDL 1.2.15 on Linux, SDL_SemWaitTimeout appears to return -1 when I was expecting SDL_MUTEX_TIMEDOUT. I don't see this issue on 1.2.14.
According to the documentation for SDL_SemWaitTimeout, it should return 0 if successfully locked, SDL_MUTEX_TIMEDOUT (1) if timed out, and -1 on error.
However, after debugging in GDB, what I see is the following:
SDL_SemWaitTimeout calls sem_timedwait and sem_timedwait returns -1
errno is set to ETIMEDOUT (110)
SDL_SemWaitTimeout sets the SDL error to "Connection timed out"
SDL_SemWaitTimeout returns -1
My app interprets this as a failure instead of a timeout (and unfortunately my app doesn't handle this failure very gracefully :)
Looking at the documentation for sem_timedwait, it fails (-1) and sets errno=ETIMEDOUT if the timeout expires.
Assuming my analysis is correct, the attached patch should solve this problem.
This bug report was migrated from our old Bugzilla tracker.
These attachments are available in the static archive:
Reported in version: 1.2.15
Reported for operating system, platform: Linux, x86
Comments on the original bug report:
On 2012-02-19 19:01:08 +0000, wrote:
On 2012-02-20 20:52:20 +0000, Sam Lantinga wrote:
The text was updated successfully, but these errors were encountered: