Skip to content

Not all platforms support flock on SHM files#2621

Description

@KerstinKeller

Problem Description

With eCAL 6.x, we introduced flock protection for SHM file initialization to prevent race conditions leading to SIGBUS errors.
However, not all platforms (namely MacOS and QNX) support flocking files created with shm_open.

This means, that we need a fallback locking method, or find a different way to protect initialization

Possible solutions:

  • dedicated lock file, where existance means that the file is locked.
  • Creating file under temporary name and rename after initialization
    • Random / timestamped temporary filename
    • everyone creates same filename, might lead to problems when a process crashes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions