[support.signal] (original) (raw)

17 Language support library [support]

17.14 Other runtime support [support.runtime]

17.14.5 Signal handlers [support.signal]

A call to the function signal synchronizes with any resulting invocation of the signal handler so installed.

A plain lock-free atomic operation is an invocation of a function f from [atomics], such that:

An evaluation is signal-safe unless it includes one of the following:

A signal handler invocation has undefined behavior if it includes an evaluation that is not signal-safe.

The function signal is signal-safe if it is invoked with the first argument equal to the signal number corresponding to the signal that caused the invocation of the handler.

See also: ISO/IEC 9899:2018, 7.14