Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • D dbus
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 264
    • Issues 264
    • List
    • Boards
    • Service Desk
    • Milestones
  • Custom issue tracker
    • Custom issue tracker
  • Merge requests 37
    • Merge requests 37
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

Due to an influx of spam, we have had to impose restrictions on new accounts. Please see this wiki page for instructions on how to get full permissions. Sorry for the inconvenience.

  • dbusdbus
  • dbus
  • Merge requests
  • !19

build: Never use poll() on Darwin family (macOS, etc.) or Interix

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Simon McVittie requested to merge smcv/dbus:broken-poll into master Oct 22, 2018
  • Overview 0
  • Commits 1
  • Pipelines 2
  • Changes 2

Doing a runtime check in configure.ac (AC_RUN_IFELSE) has several disadvantages:

  • It doesn't work when cross-compiling. For example, if we build macOS binaries on a Linux system, we'd assume that poll() works, but in fact it won't.

  • It checks the build system capabilities, but that is not necessarily appropriate if (for example) a macOS 10.10 user builds binaries that could be used by macOS 10.12 or macOS 10.9 users.

  • It checks for one specific failure mode, but macOS seems to have a history of various implementation issues in poll().

  • If we want it to work in CMake, we have to duplicate it in the CMake build system.

None of these is a showstopper on its own, but the combination of all of them makes the current approach to avoiding the broken poll() on macOS look unreliable. libcurl, a widely-portable library making extensive use of sockets, specifically doesn't use poll() on Darwin (macOS, iOS, etc.) or on Interix; let's follow their example here.

See also https://bugzilla.gnome.org/show_bug.cgi?id=302672 and https://daniel.haxx.se/blog/2016/10/11/poll-on-mac-10-12-is-broken/ for some relevant history.

Signed-off-by: Simon McVittie smcv@collabora.com Resolves: #232 (closed)

Edited Oct 22, 2018 by Simon McVittie
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: broken-poll