Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • L libxtrans
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 4
    • Issues 4
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 5
    • Merge requests 5
  • 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
  • xorgxorg
  • lib
  • libxtrans
  • Merge requests
  • !3

Use a lock file in addition to the UNIX domain socket file

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Jon Turney requested to merge jturney/libxtrans:master into master Jan 08, 2019
  • Overview 4
  • Commits 1
  • Pipelines 0
  • Changes 1

When a server listens on UNIX domain socket only, it unconditionally unlink()s any existing socket before trying to bind() it. If that socket belonged to a still-running server, it's no longer contactable.

This isn't a problem on Linux, as ordinarily an attempt is made to create an abstract socket first (which fails if it's already bound). But if that's turned off, or on a different OS which doesn't support abstract sockets, this will cause problems.

eg. 'Xvfb -displayfd 2 -nolisten local &' repeated always gets allocated the same display number.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: master