diff options
author | Test_User <hax@andrewyu.org> | 2024-07-22 23:11:54 -0400 |
---|---|---|
committer | Test_User <hax@andrewyu.org> | 2024-07-22 23:11:54 -0400 |
commit | 74ebc09736f85fb72a5bcdc96b93ae50cf86652d (patch) | |
tree | b4d3811cd565d64053b6baff2adcde17812e73bb /mutex.h | |
parent | e859880db83c5120670b87c1d5a8cf03eedc1806 (diff) | |
download | haxircd-74ebc09736f85fb72a5bcdc96b93ae50cf86652d.tar.gz haxircd-74ebc09736f85fb72a5bcdc96b93ae50cf86652d.zip |
Bit of improvement on error handling for networking
Diffstat (limited to 'mutex.h')
-rw-r--r-- | mutex.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -98,7 +98,7 @@ inline void mutex_lock(sem_t *mutex) { } inline void mutex_unlock(sem_t *mutex) { - sem_trywait(mutex); + while (sem_trywait(mutex) == -1 && errno == EINTR); sem_post(mutex); } |