aboutsummaryrefslogtreecommitdiffstats
path: root/adb/adb.h
diff options
context:
space:
mode:
authorBenoit Goby <benoit@android.com>2012-03-16 14:50:07 -0700
committerBenoit Goby <benoit@android.com>2012-03-16 15:30:05 -0700
commitf366b3698b409405e1ee88476d1186f29fe14b06 (patch)
tree8e8587da4f07dade768090ac459b7c005532c521 /adb/adb.h
parent7941cf87f624e7747b5bb868a27904c7a3be0ca4 (diff)
downloadsystem_core-f366b3698b409405e1ee88476d1186f29fe14b06.tar.gz
system_core-f366b3698b409405e1ee88476d1186f29fe14b06.tar.bz2
system_core-f366b3698b409405e1ee88476d1186f29fe14b06.zip
adb: Don't synchronize with transport using sleep
Services that cause adbd to reboot are currently implemented this way: write(fd, response) close(fd) sleep(1) exit(1) sleep(1) is necessary to leave time for the transport to transmit the response before the daemon exits. This is slow and unreliable. Instead, add a flag to the asocket to make it exit the daemon only after the socket is closed. Change-Id: I9df45ea6221f0d9b828703b9b2316a5d4fe59352
Diffstat (limited to 'adb/adb.h')
-rw-r--r--adb/adb.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/adb/adb.h b/adb/adb.h
index 85922bf8..03a7393a 100644
--- a/adb/adb.h
+++ b/adb/adb.h
@@ -86,6 +86,11 @@ struct asocket {
*/
int closing;
+ /* flag: quit adbd when both ends close the
+ ** local service socket
+ */
+ int exit_on_close;
+
/* the asocket we are connected to
*/