summaryrefslogtreecommitdiffstats
path: root/adb/fdevent.c
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Add more debug information."Leo Wang2014-08-151-2/+0
| | | | | | This reverts commit 8693bc7abd39f9dcd4b73bdd43054de450a45a03. Change-Id: I7e6df6c155d9a7544c860b21bcb31c4e04d122e7
* Add more debug information.leozwang2014-08-141-0/+2
| | | | | | | Add socketpair debug log. Also output thread information in log on host side. Change-Id: I38168990d77e53eff69cb70f442cc4e7acb4b20f
* Consolidate adb trace macro defines into its own header file.leozwang2014-07-291-11/+2
| | | | | | | | Most code is copied and pasted from adb.h. Any file can just include it to enable tracing. Removed some duplications. Change-Id: Ie1ed9e9edbf92158aac84669fbcbf7dc85fe2cf0
* adb: keep mac build happyJP Abgrall2011-03-291-1/+1
| | | | | | Use FIONREAD instead of TIOCINQ Change-Id: Ic9db0228a51c546a798c70f08f2e644a1a376120
* adb: fix subprocess exit handling, oom adjust fixes, extra debugging.JP Abgrall2011-03-281-26/+215
| | | | | | | | | | | | | | | | | | | | | | | | | | | * Add support for correctly handling subprocess termination in shell service (b/3400254 b/3482112 b/2249397) - have a waitpid() track the subprocess, then notify the fdevent via a socket - force an eof on the pty master in fdevent's new subproc handler. - modify fdevent to force-read the pty after an exit. * Migrate the "shell:blabla" handling to "#if !ADB_HOST" sections, where it belongs. * Fix the race around OOM adjusting. - Do it in the child before exec() instead of the in the parent as the child could already have started or not (no /proc/pid/... yet). * Allow for multi-threaded D() invocations to not clobber each other. - Allow locks across object files. - Add lock within D() - Make sure sysdesp init (mutex init also) is called early. * Add some missing close(fd) calls - Match similar existing practices near dup2() * Add extra D() invocations related to FD handling. * Warn about using debugging as stderr/stdout is used for protocol. * Fix some errno handling and make D() correctly handle it. * Add new adb trace_mask: services. * Make fdevent_loop's handle BADFDs more gracefully (could occur some subproc closed its pts explicitely). * Remove obsolete commandline args reported in help. (b/3509092) Change-Id: I928287fdf4f1a86777e22ce105f9581685f46e35
* Revert "Fix adb hang when subprocess dies early."JP Abgrall2011-02-231-116/+27
| | | | | | | | This is for http://b/3482112 "adb interactions with device causing test harness failures". This reverts commit 69c5c4c45bd4f1575ae8bdba13795297be7deb8c. Change-Id: I630bf2e04d2ecf0223bd2af4e87136754ff880d3
* Fix adb hang when subprocess dies early.JP Abgrall2011-02-181-27/+116
| | | | | | | | | | | | | | | | | | | | | | | | * Handling of the subprocess and its FD. This fixes http://b/3400254 "Many bugreports getting hung at the end in monkey" - Start up a service thread that waits on the subprocess to terminate, then closes the FD associated with it. - Have the event handler select() with a timeout so that it can detect the closed FD. Select() with no timeout does not return when an FD is closed. - Have the event handler force a read on the closed FD to trigger the close sequence. - Migrate the "shell:blabla" handling to "#if !ADB_HOST" sections. * Fix the race around OOM adjusting. - Do it in the child before exec() instead of the in the parent as the child could already have started or not (no /proc/pid/... yet). * Allow for multi-threaded D() invocations to not clobber each other. - Allow locks across object files. - Add lock within D() * Add some missing close(fd) calls - Match similar existing practices near dup2() * Add extra D() invocations related to FD handling. * Warn about using debugging as stderr/stdout is used for protocol. Change-Id: Ie5c4a5e6bfbe3f22201adf5f9a205d32e069bf9d Signed-off-by: JP Abgrall <jpa@google.com>
* Cleaning up whitespace in adb sources. Nothing more, nothing less.David 'Digit' Turner2009-05-181-17/+17
|
* Move fdevent from libcutils into adb directory. ADB is the only client of ↵David 'Digit' Turner2009-05-181-0/+506
this API, and I intend to modify it extensively to clean its codebase soon.