From 54ac76c305935b12b78ab6b464111dd227acdcbf Mon Sep 17 00:00:00 2001 From: Michael Pratt Date: Wed, 6 Mar 2019 12:54:45 -0800 Subject: 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 --- test/syscalls/linux/kill.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/syscalls/linux/kill.cc b/test/syscalls/linux/kill.cc index de50daf0b..cd98de41f 100644 --- a/test/syscalls/linux/kill.cc +++ b/test/syscalls/linux/kill.cc @@ -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(); -- cgit v1.2.3