Skip to content

POSIX signal handling is not async-signal-safe #296

Description

@sgerbino

Summary

The POSIX signal handler is not async-signal-safe: it locks mutexes and
allocates memory inside the handler. Ruben Perez escalated this to an acceptance
condition.

Detail

posix/posix_signal_service.hpp locks mutexes and calls a virtual function that
locks more mutexes and allocates memory in the signal handler — a regression vs
Asio's async-signal-safe self-pipe / signalfd write().

Acceptance criteria

  • The signal handler performs only async-signal-safe operations (no mutex
    locking, no allocation).
  • Approach comparable to Asio's self-pipe / signalfd write().

References

posix/posix_signal_service.hpp; Asio's async-signal-safe self-pipe/signalfd
approach.

Raised by Gennaro Prota; escalated by Ruben Perez ("This implementation is
dangerous... adding properly addressing this as an acceptance condition").
Source: Boost ML announcement.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Ready

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions