mirror of
https://github.com/postgres/postgres.git
synced 2026-02-27 03:40:28 -05:00
Use signal-safe functions in signal handler
According to signal-safety(7), exit(3) and puts(3) are not safe to call in a signal handler. Author: Tristan Partin <tristan@neon.tech> Discussion: https://www.postgresql.org/message-id/flat/CTVDKVZCCVSY.1XQ87UL50KQRD%40gonk
This commit is contained in:
parent
7636725b92
commit
52e98d4502
1 changed files with 2 additions and 2 deletions
|
|
@ -602,8 +602,8 @@ signal_cleanup(SIGNAL_ARGS)
|
|||
if (needs_unlink)
|
||||
unlink(filename);
|
||||
/* Finish incomplete line on stdout */
|
||||
puts("");
|
||||
exit(1);
|
||||
write(STDOUT_FILENO, "\n", 1);
|
||||
_exit(1);
|
||||
}
|
||||
|
||||
#ifdef HAVE_FSYNC_WRITETHROUGH
|
||||
|
|
|
|||
Loading…
Reference in a new issue