Remove unsafe ScopedSigaction

ScopedSigaction is not async-signal-safe, so it cannot be used after fork.
Replace it with plain sigaction, which is safe. This is in a unique child
anyways, so it doesn't need any cleanup.

PiperOrigin-RevId: 237102411
Change-Id: I5c6ea373bbac67b9c4db204ceb1db62d338d9178
This commit is contained in:
Michael Pratt
2019-03-06 12:55:52 -08:00
committed by Shentubot
parent 0b76887147
commit 54ac76c305
+2 -1
View File
@@ -70,7 +70,8 @@ TEST(KillTest, CanKillAllPIDs) {
sa.sa_sigaction = SigHandler;
sigfillset(&sa.sa_mask);
sa.sa_flags = SA_SIGINFO;
auto cleanup = ScopedSigaction(SIGWINCH, sa).ValueOrDie();
TEST_PCHECK(sigaction(SIGWINCH, &sa, nullptr) == 0);
MaybeSave();
// Indicate to the parent that we're ready.
write_fd.reset();