summaryrefslogtreecommitdiffstats
path: root/tools/android
diff options
context:
space:
mode:
authornavabi@google.com <navabi@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-20 01:31:21 +0000
committernavabi@google.com <navabi@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-20 01:31:21 +0000
commit9c943267a6612fdef07fbe020169ecb566720562 (patch)
tree13f8af96e8edfe07cee7af29c4ecb39b8a3dee68 /tools/android
parent1370190c2d64927bbd85c7810e20298431dce3f6 (diff)
downloadchromium_src-9c943267a6612fdef07fbe020169ecb566720562.zip
chromium_src-9c943267a6612fdef07fbe020169ecb566720562.tar.gz
chromium_src-9c943267a6612fdef07fbe020169ecb566720562.tar.bz2
Make daemon able to exit adb by closing all discriptors.
BUG=169338 Review URL: https://chromiumcodereview.appspot.com/12516013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@189190 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/android')
-rw-r--r--tools/android/adb_reboot/adb_reboot.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/android/adb_reboot/adb_reboot.c b/tools/android/adb_reboot/adb_reboot.c
index a581d21..05e6221 100644
--- a/tools/android/adb_reboot/adb_reboot.c
+++ b/tools/android/adb_reboot/adb_reboot.c
@@ -15,6 +15,10 @@ int main(int argc, char ** argv) {
if (i > 0)
return 0;
+ int j;
+ for (j = 0; j < getdtablesize(); j++)
+ close(j);
+
/* child (daemon) continues */
setsid(); /* obtain a new process group */