[Wayland-bugs] [Bug 91799] Usage of timerfd_create and signalfd prevent porting to non-linux platforms

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Sep 1 05:30:04 PDT 2015


https://bugs.freedesktop.org/show_bug.cgi?id=91799

--- Comment #9 from Daniel Stone <daniel at fooishbar.org> ---
(In reply to Alexander von Gluck from comment #1)
> https://ldpreload.com/blog/signalfd-is-useless a pretty good article on
> signalfd.

See the note at the end: 'So my claim that there’s a better alternative to
signalfd is wrong [...]'.

> The solution for this usage is to just spin up a pthread to grab
> signals.

Yeah, introducing threads just delivers a whole series of other problems,
particularly as the pthread API is so fragile and broken. My preferred solution
would be something similar to XCB's libpthread-stubs, where we allow other
platforms to provide an API similar to that of signalfd - an FD to add to our
existing event loop dispatch which notifies us of signals - providing their own
implementation, which could use pthreads.

But going to pthreads makes the lives of a lot of users measurably worse, and
going to #ifdefs makes the lives of most developers measurably worse.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-bugs/attachments/20150901/913ae1d5/attachment.html>


More information about the wayland-bugs mailing list