1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-12-23 23:51:07 +02:00
Files
Maxim Michkov e13c462908 Fix deadlock due to logging in signal handler.
Previously it was possible to achieve a deadlock in a signal handler, for example when SIGTERM (i.e. sent by `pgbackrest stop --force`) arrives when a lock used in `gmtime_r` is taken. Then the next time logging is done, it will deadlock on `gmtime_r`.

In general, most stdlib functions are not safe to call in signal handlers, only so called async-signal safe functions are. In particular, `snprintf` isn't safe since it is allowed to internally call `malloc`. The `exitSafe` function isn't safe due to extensive use of allocations. Because of this, we need to use a simpler logging format in signal handlers, one that only uses async-signal safe functions.
2025-12-22 14:43:15 +07:00
..
2025-10-18 11:18:32 +02:00
2025-11-12 14:27:22 +02:00
2025-11-12 14:27:22 +02:00
2025-11-12 14:27:22 +02:00