mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user