Add `struct sigaction64` and `sigaction64`.
Bug: http://b/72493232
Test: ran tests
Change-Id: I47b0560a30aa33a9b1f1978dfb7f84d2e3d389b8
diff --git a/libc/bionic/spawn.cpp b/libc/bionic/spawn.cpp
index 7422a0b..fde102c 100644
--- a/libc/bionic/spawn.cpp
+++ b/libc/bionic/spawn.cpp
@@ -98,17 +98,17 @@
// POSIX: "Signals set to be caught by the calling process shall be
// set to the default action in the child process."
bool use_sigdefault = ((flags & POSIX_SPAWN_SETSIGDEF) != 0);
- const struct sigaction default_sa = { .sa_handler = SIG_DFL };
+ const struct sigaction64 default_sa = { .sa_handler = SIG_DFL };
for (int s = 1; s < _NSIG; ++s) {
bool reset = false;
if (use_sigdefault && sigismember64(&(*attr)->sigdefault.sigset64, s)) {
reset = true;
} else {
- struct sigaction current;
- if (sigaction(s, nullptr, ¤t) == -1) _exit(127);
+ struct sigaction64 current;
+ if (sigaction64(s, nullptr, ¤t) == -1) _exit(127);
reset = (current.sa_handler != SIG_IGN && current.sa_handler != SIG_DFL);
}
- if (reset && sigaction(s, &default_sa, nullptr) == -1) _exit(127);
+ if (reset && sigaction64(s, &default_sa, nullptr) == -1) _exit(127);
}
if ((flags & POSIX_SPAWN_SETPGROUP) != 0 && setpgid(0, (*attr)->pgroup) == -1) _exit(127);