| commit | 88468f31ad19ee32a259ac665176c61d8f11db12 | [log] [tgz] |
|---|---|---|
| author | Benoit Goby <benoit@android.com> | Fri Mar 16 14:50:07 2012 -0700 |
| committer | Benoit Goby <benoit@android.com> | Fri Mar 16 15:30:05 2012 -0700 |
| tree | 9ab40ae85213ef0be985a15d8ce5bc1aa5b5bdb6 | |
| parent | ad926c17c9b253350cde3395356aacbb92701818 [diff] |
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