Code drop from //branches/cupcake/...@124589

This commit is contained in:
The Android Open Source Project
2008-12-17 18:03:48 -08:00
parent a27d2baa0c
commit 4e468ed2eb
287 changed files with 11498 additions and 344 deletions

View File

@@ -16,20 +16,20 @@ void debugger_signal_handler(int n)
{
unsigned tid;
int s;
/* avoid picking up GC interrupts */
/* avoid picking up GC interrupts */
signal(SIGUSR1, SIG_IGN);
tid = gettid();
s = socket_local_client("android:debuggerd",
ANDROID_SOCKET_NAMESPACE_ABSTRACT, SOCK_STREAM);
if(s >= 0) {
/* debugger knows our pid from the credentials on the
** local socket but we need to tell it our tid. It
** is paranoid and will verify that we are giving a tid
** that's actually in our process
*/
/* debugger knows our pid from the credentials on the
* local socket but we need to tell it our tid. It
* is paranoid and will verify that we are giving a tid
* that's actually in our process
*/
write(s, &tid, sizeof(unsigned));
read(s, &tid, 1);
@@ -37,7 +37,7 @@ void debugger_signal_handler(int n)
close(s);
}
/* remove our net so we fault for real when we return */
/* remove our net so we fault for real when we return */
signal(n, SIG_IGN);
}