Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Wed, 5 Dec 2018 19:16:05 +0000
From: Orivej Desh <>
Subject: sem_wait and EINTR


musl differs from glibc in that it does not return from sem_wait() on EINTR.
This mail [1] explains that this is useful to safeguard the software that does
not check sem_wait() return code. However, since glibc does return EINTR, such
bugs in the open source software seem to be eventually noticed and fixed.

The musl behaviour has a disadvantage in that it makes sem_wait() difficult to
interrupt (and delays the return from sem_timedwait() until the timeout), which
is relied upon in particular by multithreaded fuse for breaking out of the
main thread waiting loop [2]. IMHO the fuse implementation is sensible, since it
looks better than the alternatives I could imagine, and I'm inclined to patch
musl like this [3] to meet its expectations.

Am I missing some implications? Would you reconsider returning from sem_wait()
on EINTR? Could you suggest a good fix for fuse that does not change musl?


Powered by blists - more mailing lists

Your e-mail address:

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.