summaryrefslogtreecommitdiffhomepage
path: root/test/syscalls/linux/kill.cc
diff options
context:
space:
mode:
authorMichael Pratt <mpratt@google.com>2019-03-06 12:54:45 -0800
committerShentubot <shentubot@google.com>2019-03-06 12:55:52 -0800
commit54ac76c305935b12b78ab6b464111dd227acdcbf (patch)
tree4df6c3d3ec35bb218b6f96c6f1155c41c650e7d3 /test/syscalls/linux/kill.cc
parent0b76887147820a809beaa497ede8dc4f7b7b120a (diff)
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
Diffstat (limited to 'test/syscalls/linux/kill.cc')
-rw-r--r--test/syscalls/linux/kill.cc3
1 files changed, 2 insertions, 1 deletions
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();