diff options
author | Josh Gao <jmgao@google.com> | 2017-02-01 17:43:14 -0800 |
---|---|---|
committer | Josh Gao <jmgao@google.com> | 2017-02-02 13:54:39 -0800 |
commit | b3ee52e4d0ee6f52c78d5f12cdc551686b1ebba7 (patch) | |
tree | 11ac8fedec1ef5e808019f9153e88f1395469ad5 /libunwindstack/tests/MemoryFileTest.cpp | |
parent | 85bcaf68d33ac0d92df0a3aa6ce34a09b382a9e6 (diff) |
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
Diffstat (limited to 'libunwindstack/tests/MemoryFileTest.cpp')
0 files changed, 0 insertions, 0 deletions