android_system_core/debuggerd
Josh Gao b3ee52e4d0 debuggerd_handler: don't use clone(..., SIGCHLD, ...)
Processes that handle SIGCHLD can race with the crash handler to wait
on the crash_dump process. Use clone flags that cause the forked
child's death to not be reported via SIGCHLD, and don't bail out of
dumping when waitpid returns ECHILD (in case another thread is already
in a waitpid(..., __WALL))

Note that the use of waitid was switched to waitpid, because waitid
doesn't support __WCLONE until kernel version 4.7.

Bug: none
Test: "debuggerd -b `pidof zygote64`" a few times (failed roughly 50%
      of the time previously)
Change-Id: Ia41a26a61f13c6f9aa85c4c2f88aef8d279d35ad
2017-02-02 13:54:39 -08:00
..
client debuggerd: advance our amazing bet. 2017-01-17 13:57:57 -08:00
crasher debuggerd: advance our amazing bet. 2017-01-17 13:57:57 -08:00
handler debuggerd_handler: don't use clone(..., SIGCHLD, ...) 2017-02-02 13:54:39 -08:00
include/debuggerd debuggerd_handler: add SIGSYS to the list of handled signals. 2017-01-23 16:01:14 -08:00
libdebuggerd debuggerd: advance our amazing bet. 2017-01-17 13:57:57 -08:00
tombstoned tombstoned: silence spurious error messages. 2017-01-23 16:01:14 -08:00
.clang-format debuggerd: add .clang-format. 2015-11-16 17:26:22 -08:00
Android.bp debuggerd: advance our amazing bet. 2017-01-17 13:57:57 -08:00
crash_dump.cpp crash_dump: drop capabilities after we ptrace attach. 2017-02-02 13:54:38 -08:00
debuggerd.cpp debuggerd: fix debuggerd <pid> 2017-01-30 17:58:04 -08:00
debuggerd_test.cpp debuggerd_handler: properly crash when PR_GET_DUMPABLE is 0. 2017-01-23 14:13:36 -08:00
MODULE_LICENSE_APACHE2 auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
NOTICE auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
signal_sender.cpp liblog: use log/log.h when utilizing ALOG macros 2017-01-11 09:31:15 -08:00
util.cpp debuggerd: advance our amazing bet. 2017-01-17 13:57:57 -08:00