From 16a7bc2355535c52b3305c8b387f9717cb1f90b4 Mon Sep 17 00:00:00 2001 From: Christopher Ferris Date: Mon, 31 Jan 2022 13:08:54 -0800 Subject: [PATCH] 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 --- debuggerd/debuggerd_test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debuggerd/debuggerd_test.cpp b/debuggerd/debuggerd_test.cpp index 2cf5b18df..0737612e0 100644 --- a/debuggerd/debuggerd_test.cpp +++ b/debuggerd/debuggerd_test.cpp @@ -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); \