postgresql/src/fe_utils
Nathan Bossart 28e4632509 Centralize logic for restoring errno in signal handlers.
Presently, we rely on each individual signal handler to save the
initial value of errno and then restore it before returning if
needed.  This is easily forgotten and, if missed, often goes
undetected for a long time.

In commit 3b00fdba9f, we introduced a wrapper signal handler
function that checks whether MyProcPid matches getpid().  This
commit moves the aforementioned errno restoration code from the
individual signal handlers to the new wrapper handler so that we no
longer need to worry about missing it.

Reviewed-by: Andres Freund, Noah Misch
Discussion: https://postgr.es/m/20231121212008.GA3742740%40nathanxps13
2024-02-14 16:34:18 -06:00
..
.gitignore Move psql's psqlscan.l into src/fe_utils. 2016-03-24 20:28:47 -04:00
Makefile Update copyright for 2024 2024-01-03 20:49:05 -05:00
archive.c Update copyright for 2024 2024-01-03 20:49:05 -05:00
cancel.c Centralize logic for restoring errno in signal handlers. 2024-02-14 16:34:18 -06:00
conditional.c Update copyright for 2024 2024-01-03 20:49:05 -05:00
connect_utils.c Update copyright for 2024 2024-01-03 20:49:05 -05:00
mbprint.c Update copyright for 2024 2024-01-03 20:49:05 -05:00
meson.build Update copyright for 2024 2024-01-03 20:49:05 -05:00
option_utils.c Update copyright for 2024 2024-01-03 20:49:05 -05:00
parallel_slot.c Update copyright for 2024 2024-01-03 20:49:05 -05:00
print.c Update copyright for 2024 2024-01-03 20:49:05 -05:00
psqlscan.l Update copyright for 2024 2024-01-03 20:49:05 -05:00
query_utils.c Update copyright for 2024 2024-01-03 20:49:05 -05:00
recovery_gen.c Update copyright for 2024 2024-01-03 20:49:05 -05:00
simple_list.c Update copyright for 2024 2024-01-03 20:49:05 -05:00
string_utils.c Update copyright for 2024 2024-01-03 20:49:05 -05:00