On 08/14/2012 12:15 PM, Yury wrote:
> Hi all.
>
> I try to understand now how vold works and I've found that if some
> volume cannot be unmounted Android detects which process holds the
> resources and sends to it SIGTERM Linux signal. So, maybe someone can
> answer and explain the following questions:
> 1. How do Android processes process this signal? What happens with an
> Android process when it receives this signal? Where can I find code that
> process this signal?
AFAIK, Signals are handled the same as they would be on any Linux. See
http://unixhelp.ed.ac.uk/CGI/man-cgi?signal+7 which explains the default
actions and such.
Processes are allowed to install their own signal handlers. If they
don't then the default actions in the link above are taken. I'm not
sure if these actions are taken by the kernel or by libc (bionic).
> 2. Is it possible to send this signal to system process like
> system_server, acore or launcher? How do they process them and how they
> are recovered from the incorrect state?