platform_system_core/adb
David Pursell f2aa186c7b adbd: properly close subprocess pipes on Ctrl+C.
When non-interactive sessions exit via Ctrl+C, adbd sends SIGHUP
to the child process to let it know to exit. However, adbd was not
closing the pipes to the child process, so if the subprocess ignored
SIGHUP and continued writing it could fill up the pipe and block
forever while adbd waits for it to exit.

This CL adds the necessary calls to close the subprocess pipe after
sending SIGHUP.

Bug: 28981563
Change-Id: I318e322e563241052648361172f4859c297837fb
2016-06-06 09:59:34 -07:00
..
client adb: support forwarding TCP port 0. 2016-05-09 16:55:10 -07:00
daemon adb: support forwarding TCP port 0. 2016-05-09 16:55:10 -07:00
sysdeps adb: retry connecting disconnected emulators instead of always looping. 2016-05-24 16:38:47 -07:00
.clang-format adb: fix clang-format for access modifier dedent. 2016-02-18 14:52:07 -08:00
Android.mk adb: add track-jdwp and track-devices commands. 2016-05-14 18:35:44 -07:00
CPPLINT.cfg Ignore whitespace/indent issues from cpplint. 2015-05-18 16:49:07 -07:00
MODULE_LICENSE_APACHE2 eclair snapshot 2009-11-12 18:46:23 -08:00
NOTICE eclair snapshot 2009-11-12 18:46:23 -08:00
OVERVIEW.TXT Fixing spelling errors in adb docs 2010-04-28 11:38:39 -04:00
SERVICES.TXT adb sync cleanup. 2015-08-24 11:15:01 -07:00
SYNC.TXT adb sync cleanup. 2015-08-24 11:15:01 -07:00
adb.cpp adb: replace failing exits in adbd with abort(). 2016-05-14 18:52:46 -07:00
adb.h adb: retry connecting disconnected emulators instead of always looping. 2016-05-24 16:38:47 -07:00
adb_auth.cpp Kill load_file. 2016-05-27 16:14:02 -07:00
adb_auth.h Kill load_file. 2016-05-27 16:14:02 -07:00
adb_auth_client.cpp Switch fs_mgr and adb to libcrypto_utils. 2016-04-12 23:04:11 +00:00
adb_auth_host.cpp Kill load_file. 2016-05-27 16:14:02 -07:00
adb_client.cpp adb: add reconnect command. 2016-04-05 15:21:36 -07:00
adb_client.h adb: wait for adbd to die and respawn in root/unroot. 2016-03-04 15:48:39 -08:00
adb_io.cpp Increase the maximum shell command length to 4096ish. 2016-01-15 15:02:19 -08:00
adb_io.h adb: fix adb client running out of sockets on Windows 2015-10-30 16:23:10 -07:00
adb_io_test.cpp adb: disable tests that are expected to fail on Win32. 2016-04-18 14:33:38 -07:00
adb_listeners.cpp adb: support forwarding TCP port 0. 2016-05-09 16:55:10 -07:00
adb_listeners.h adb: support forwarding TCP port 0. 2016-05-09 16:55:10 -07:00
adb_listeners_test.cpp adb: support forwarding TCP port 0. 2016-05-09 16:55:10 -07:00
adb_trace.cpp Track rename of base/ to android-base/. 2015-12-04 22:00:26 -08:00
adb_trace.h Fix misc-macro-parentheses warnings in adb, debuggerd, libbacktrace. 2016-05-18 15:53:15 -07:00
adb_utils.cpp [adb] Issue the "auth" emulator command before any other one 2016-05-27 13:34:40 -07:00
adb_utils.h Kill adb's ScopedFd for unique_fd. 2016-05-27 17:51:24 -07:00
adb_utils_test.cpp adb: support forwarding TCP port 0. 2016-05-09 16:55:10 -07:00
commandline.cpp Kill load_file. 2016-05-27 16:14:02 -07:00
console.cpp [adb] Issue the "auth" emulator command before any other one 2016-05-27 13:34:40 -07:00
diagnose_usb.cpp Share the new adb USB diagnostic code with fastboot. 2015-12-14 10:50:21 -08:00
diagnose_usb.h Share the new adb USB diagnostic code with fastboot. 2015-12-14 10:50:21 -08:00
fdevent.cpp Fix google-explicit-constructor warnings. 2016-04-29 15:44:04 -07:00
fdevent.h adb: make fdevent_test, socket_test compile on Windows. 2016-02-19 11:24:51 -08:00
fdevent_test.cpp adb: make fdevent_test, socket_test compile on Windows. 2016-02-19 11:24:51 -08:00
fdevent_test.h adb: fix socket tests. 2016-04-25 19:51:58 -07:00
file_sync_client.cpp adb: mkdir the correct directory name when pulling. 2016-03-03 14:53:06 -08:00
file_sync_service.cpp adbd: restore the old error handling behavior. 2016-02-19 18:01:09 -08:00
file_sync_service.h adb: change unsigned to uint32_t in sync struct definitions. 2016-02-19 14:37:04 -08:00
framebuffer_service.cpp Move adb to C++. 2015-03-09 14:06:11 -07:00
get_my_path_darwin.cpp Move get_my_path_darwin to C++. 2015-04-16 13:24:58 -07:00
get_my_path_linux.cpp Move adb to C++. 2015-03-09 14:06:11 -07:00
jdwp_service.cpp Switch from using sockaddr to sockaddr_storage. 2015-12-07 16:07:46 +09:00
line_printer.cpp Improve dumb terminal support (emacs is dumb). 2016-01-08 15:47:07 -08:00
line_printer.h Simplify adb LinePrinter newline handling. 2015-12-09 18:42:41 -08:00
mutex_list.h adb: switch the socket list mutex to a recursive_mutex. 2016-05-18 14:21:53 -07:00
protocol.txt Increase size of the the adb packets sent over the wire 2015-07-22 13:06:06 -07:00
remount_service.cpp adb: remove exit-time destructors. 2015-11-12 11:20:19 -08:00
remount_service.h Failure to find an oem partition should not be a remount failure. 2015-05-11 13:36:13 -07:00
security_log_tags.h ADB security logging 2016-01-21 15:57:02 +00:00
services.cpp Merge "adb: add reconnect command." 2016-04-16 01:50:54 +00:00
services.h adb: put legacy shell: service back in. 2015-09-30 15:40:09 -07:00
set_verity_enable_state_service.cpp adb: use libfec in disable-verity 2015-10-20 13:55:24 +01:00
shell_service.cpp adbd: properly close subprocess pipes on Ctrl+C. 2016-06-06 09:59:34 -07:00
shell_service.h Track rename of base/ to android-base/. 2015-12-04 22:00:26 -08:00
shell_service_protocol.cpp adb: create shell protocol class (take 2). 2015-09-08 10:04:10 -07:00
shell_service_protocol_test.cpp adb: fix shell_service_protocol_test for Windows. 2015-09-11 18:28:27 -07:00
shell_service_test.cpp adb: fix subprocess termination for legacy shell. 2016-01-27 17:13:41 -08:00
socket.h Address const issues in preparation for libcxx rebase. 2016-03-29 17:17:51 +00:00
socket_test.cpp adb: fix socket tests. 2016-04-25 19:51:58 -07:00
sockets.cpp adb: use asocket's close function when closing. 2016-05-18 14:21:53 -07:00
sockets.dia auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
sysdeps.h Kill load_file. 2016-05-27 16:14:02 -07:00
sysdeps_test.cpp adb: retry connecting disconnected emulators instead of always looping. 2016-05-24 16:38:47 -07:00
sysdeps_unix.cpp adb: use TCP keepalive. 2016-02-23 09:11:18 -08:00
sysdeps_win32.cpp Kill load_file. 2016-05-27 16:14:02 -07:00
sysdeps_win32_test.cpp adb: allow wine's output for sysdeps_win32 strerror test. 2016-02-10 13:38:32 -08:00
test_adb.py adb: fix adb client running out of sockets on Windows 2015-10-30 16:23:10 -07:00
test_device.py adb: support forwarding TCP port 0. 2016-05-09 16:55:10 -07:00
transport.cpp adb: retry connecting disconnected emulators instead of always looping. 2016-05-24 16:38:47 -07:00
transport.h adb: retry connecting disconnected emulators instead of always looping. 2016-05-24 16:38:47 -07:00
transport_local.cpp adb: retry connecting disconnected emulators instead of always looping. 2016-05-24 16:38:47 -07:00
transport_test.cpp Fix kick_transport test. 2016-04-18 11:22:34 -07:00
transport_usb.cpp Fix kick_transport test. 2016-04-18 11:22:34 -07:00
usb_linux.cpp adb: make adb_thread_func_t return void, add adb_thread_exit. 2016-02-12 15:23:54 -08:00
usb_linux_client.cpp adb: close ep0 on disconnection. 2016-05-23 17:17:46 -07:00
usb_osx.cpp adb: use a custom thread to poll for usb devices on mac. 2016-04-19 11:26:44 -07:00
usb_windows.cpp adb: make adb_thread_func_t return void, add adb_thread_exit. 2016-02-12 15:23:54 -08:00