summaryrefslogtreecommitdiffstats
path: root/CRT.c
diff options
context:
space:
mode:
authorNathan Scott <nathans@redhat.com>2023-04-04 16:48:46 +1000
committerBenBE <BenBE@geshi.org>2023-04-06 00:19:54 +0200
commitc878343784f23d7cb18ccec6aa034f01aee8069e (patch)
treecb1272776ec4d2cabc1502b9f2d9690a46c7c94e /CRT.c
parent14da84f877a0f3627ddaea836c9537b2292fa22d (diff)
Correct some inconsistent function call conventions in CRT.c
Diffstat (limited to 'CRT.c')
-rw-r--r--CRT.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/CRT.c b/CRT.c
index 50f0c0e8..2bc9d13f 100644
--- a/CRT.c
+++ b/CRT.c
@@ -888,16 +888,16 @@ static struct sigaction old_sig_handler[32];
static void CRT_installSignalHandlers(void) {
struct sigaction act;
- sigemptyset (&act.sa_mask);
+ sigemptyset(&act.sa_mask);
act.sa_flags = (int)SA_RESETHAND | SA_NODEFER;
act.sa_handler = CRT_handleSIGSEGV;
- sigaction (SIGSEGV, &act, &old_sig_handler[SIGSEGV]);
- sigaction (SIGFPE, &act, &old_sig_handler[SIGFPE]);
- sigaction (SIGILL, &act, &old_sig_handler[SIGILL]);
- sigaction (SIGBUS, &act, &old_sig_handler[SIGBUS]);
- sigaction (SIGPIPE, &act, &old_sig_handler[SIGPIPE]);
- sigaction (SIGSYS, &act, &old_sig_handler[SIGSYS]);
- sigaction (SIGABRT, &act, &old_sig_handler[SIGABRT]);
+ sigaction(SIGSEGV, &act, &old_sig_handler[SIGSEGV]);
+ sigaction(SIGFPE, &act, &old_sig_handler[SIGFPE]);
+ sigaction(SIGILL, &act, &old_sig_handler[SIGILL]);
+ sigaction(SIGBUS, &act, &old_sig_handler[SIGBUS]);
+ sigaction(SIGPIPE, &act, &old_sig_handler[SIGPIPE]);
+ sigaction(SIGSYS, &act, &old_sig_handler[SIGSYS]);
+ sigaction(SIGABRT, &act, &old_sig_handler[SIGABRT]);
signal(SIGCHLD, SIG_DFL);
signal(SIGINT, CRT_handleSIGTERM);
@@ -906,13 +906,13 @@ static void CRT_installSignalHandlers(void) {
}
void CRT_resetSignalHandlers(void) {
- sigaction (SIGSEGV, &old_sig_handler[SIGSEGV], NULL);
- sigaction (SIGFPE, &old_sig_handler[SIGFPE], NULL);
- sigaction (SIGILL, &old_sig_handler[SIGILL], NULL);
- sigaction (SIGBUS, &old_sig_handler[SIGBUS], NULL);
- sigaction (SIGPIPE, &old_sig_handler[SIGPIPE], NULL);
- sigaction (SIGSYS, &old_sig_handler[SIGSYS], NULL);
- sigaction (SIGABRT, &old_sig_handler[SIGABRT], NULL);
+ sigaction(SIGSEGV, &old_sig_handler[SIGSEGV], NULL);
+ sigaction(SIGFPE, &old_sig_handler[SIGFPE], NULL);
+ sigaction(SIGILL, &old_sig_handler[SIGILL], NULL);
+ sigaction(SIGBUS, &old_sig_handler[SIGBUS], NULL);
+ sigaction(SIGPIPE, &old_sig_handler[SIGPIPE], NULL);
+ sigaction(SIGSYS, &old_sig_handler[SIGSYS], NULL);
+ sigaction(SIGABRT, &old_sig_handler[SIGABRT], NULL);
signal(SIGINT, SIG_DFL);
signal(SIGTERM, SIG_DFL);
@@ -1225,7 +1225,7 @@ void CRT_handleSIGSEGV(int signal) {
);
/* Call old sigsegv handler; may be default exit or third party one (e.g. ASAN) */
- if (sigaction (signal, &old_sig_handler[signal], NULL) < 0) {
+ if (sigaction(signal, &old_sig_handler[signal], NULL) < 0) {
/* This avoids an infinite loop in case the handler could not be reset. */
fprintf(stderr,
"!!! Chained handler could not be restored. Forcing exit.\n"

© 2014-2024 Faster IT GmbH | imprint | privacy policy