From 604d0c519ecb4f9ea1c14423e9cb1c2a822ce764 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Sat, 14 Sep 2024 22:54:18 -0700
Subject: [PATCH] If posix_spawn() is available, so is sigaction
---
src/process/posix/SDL_posixprocess.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/src/process/posix/SDL_posixprocess.c b/src/process/posix/SDL_posixprocess.c
index ea67d82a68926..47ebd2bbe9173 100644
--- a/src/process/posix/SDL_posixprocess.c
+++ b/src/process/posix/SDL_posixprocess.c
@@ -74,7 +74,6 @@ static bool SetupStream(SDL_Process *process, int fd, const char *mode, const ch
static void IgnoreSignal(int sig)
{
-#ifdef HAVE_SIGACTION
struct sigaction action;
sigaction(SIGPIPE, NULL, &action);
@@ -86,12 +85,6 @@ static void IgnoreSignal(int sig)
action.sa_handler = SIG_IGN;
sigaction(sig, &action, NULL);
}
-#elif defined(HAVE_SIGNAL_H)
- void (*ohandler)(int) = signal(sig, SIG_IGN);
- if (ohandler != SIG_DFL && ohandler != SIG_IGN) {
- signal(sig, ohandler);
- }
-#endif
}
static bool CreatePipe(int fds[2])