Fix typo.

Change use of new_ to old_ to save the old sigaction data. This hasn't
caused any issues, but it's obviously wrong.

Test: Ran unit tests on coral.
Change-Id: I96be5b0980c323c3aeafb422fbc06202577604a2
This commit is contained in:
Christopher Ferris 2022-01-31 13:08:54 -08:00
parent c89fed4b59
commit 16a7bc2355
1 changed files with 1 additions and 1 deletions

View File

@ -88,7 +88,7 @@ constexpr char kWaitForDebuggerKey[] = "debug.debuggerd.wait_for_debugger";
struct sigaction old_sigaction; \
struct sigaction new_sigaction = {}; \
new_sigaction.sa_handler = [](int) {}; \
if (sigaction(SIGALRM, &new_sigaction, &new_sigaction) != 0) { \
if (sigaction(SIGALRM, &new_sigaction, &old_sigaction) != 0) { \
err(1, "sigaction failed"); \
} \
alarm(seconds); \