Title
Move restriction on standard library functions in signal handlers
Status
open
Section
6.10.3.4 [basic.start.term]
Submitter
Joshua Berne

Created on 2026-06-04.00:00:00 last changed 6 days ago

Messages

Date: 2026-06-04.00:00:00

Subclause 6.10.3.4 [basic.start.term] paragraph 7 is a restriction on the use of the standard library that should be moved to the library section:

If there is a use of a standard library object or function not permitted within signal handlers (17.14 [support.runtime]) that does not happen before (6.10.2 [intro.multithread]) completion of destruction of objects with static storage duration and execution of std::atexit registered functions (17.5 [support.start.term]), the program has undefined behavior. [Note 3: If there is a use of an object with static storage duration that does not happen before the object's destruction, the program has undefined behavior. Terminating every thread before a call to std::exit or the exit from main is sufficient, but not necessary, to satisfy these requirements. These requirements permit thread managers as static-storage-duration objects. —end note]
History
Date User Action Args
2026-06-04 00:00:00admincreate