Add more debug information.
Re-commit https://googleplex-android-review.googlesource.com/#/c/519430/
Add fix for win_sdk build.
Add socketpair debug log.
Also output thread information in log on host side.
(cherry-pick of d1cfb037fa5b354187880943b8e9870ce3451785.)
Change-Id: I21021bc111a3f7362a91b70593e3738125878118
diff --git a/services.c b/services.c
index bcfc163..300807a 100644
--- a/services.c
+++ b/services.c
@@ -164,6 +164,7 @@
printf("cannot create service socket pair\n");
return -1;
}
+ D("socketpair: (%d,%d)", s[0], s[1]);
sti = malloc(sizeof(stinfo));
if(sti == 0) fatal("cannot allocate stinfo");
@@ -264,10 +265,11 @@
// 0 is parent socket, 1 is child socket
int sv[2];
- if (unix_socketpair(AF_UNIX, SOCK_STREAM, 0, sv) < 0) {
+ if (adb_socketpair(sv) < 0) {
printf("[ cannot create socket pair - %s ]\n", strerror(errno));
return -1;
}
+ D("socketpair: (%d,%d)", sv[0], sv[1]);
*pid = fork();
if (*pid < 0) {