platform_system_core/adb
David Pursell a6d5661140 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
(cherry picked from commit f2aa186c7b)
2016-06-06 12:56:52 -07:00
..
client adb: setsid() for adb host server. 2016-02-22 15:57:08 -08:00
daemon adbd: Remove check for set_supplementary_gids. 2016-01-08 10:56:20 -08:00
sysdeps adb: add implementations of mutex, recursive_mutex. 2016-05-18 17:20:30 -07:00
.clang-format adb: fix clang-format for access modifier dedent. 2016-02-22 15:57:08 -08:00
adb.cpp adb: add reconnect command. 2016-04-18 15:46:25 -07:00
adb.h adb: bump the server version to 36. 2016-04-18 15:46:25 -07:00
adb_auth.cpp Adb: use VLOG() to replace D() for verbose logging. 2015-09-23 12:53:38 -07:00
adb_auth.h
adb_auth_client.cpp adb: fix mistaken use of PLOG. 2016-03-03 15:46:50 -08:00
adb_auth_host.cpp [adb] Followup CL to clean up adb_auth_host.cpp 2016-05-26 18:12:15 -07:00
adb_client.cpp Merge changes Ia4a2ff77,I970806e3,I47daa338 into nyc-dev 2016-04-19 00:51:22 +00:00
adb_client.h adb: wait for adbd to die and respawn in root/unroot. 2016-03-04 19:15:11 -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 Track rename of base/ to android-base/. 2015-12-04 22:00:26 -08:00
adb_listeners.cpp Merge "Switch from using sockaddr to sockaddr_storage." 2015-12-08 01:41:38 +00:00
adb_listeners.h
adb_trace.cpp Track rename of base/ to android-base/. 2015-12-04 22:00:26 -08:00
adb_trace.h Track rename of base/ to android-base/. 2015-12-04 22:00:26 -08:00
adb_utils.cpp [adb] Issue the "auth" emulator command before any other one 2016-05-26 18:11:59 -07:00
adb_utils.h [adb] Issue the "auth" emulator command before any other one 2016-05-26 18:11:59 -07:00
adb_utils_test.cpp adb: mkdirs fixes 2016-02-22 15:57:08 -08:00
Android.mk Also archive adb.exe/fastboot.exe when building win_sdk. 2016-03-03 15:46:50 -08:00
commandline.cpp Display warning about bugreport delay. 2016-05-04 16:20:25 -07:00
console.cpp [adb] Issue the "auth" emulator command before any other one 2016-05-26 18:11:59 -07:00
CPPLINT.cfg
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 adb: make fdevent_test, socket_test compile on Windows. 2016-02-22 15:57:08 -08:00
fdevent.h adb: make fdevent_test, socket_test compile on Windows. 2016-02-22 15:57:08 -08:00
fdevent_test.cpp adb: make fdevent_test, socket_test compile on Windows. 2016-02-22 15:57:08 -08:00
fdevent_test.h adb: make fdevent_test, socket_test compile on Windows. 2016-02-22 15:57:08 -08:00
file_sync_client.cpp Implements 'adb bugreport <ZIP_FILE>'. 2016-04-13 09:21:23 -07:00
file_sync_service.cpp adbd: restore the old error handling behavior. 2016-02-22 15:57:09 -08:00
file_sync_service.h Implements 'adb bugreport <ZIP_FILE>'. 2016-04-13 09:21:23 -07:00
framebuffer_service.cpp
get_my_path_darwin.cpp
get_my_path_linux.cpp
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
MODULE_LICENSE_APACHE2
mutex_list.h adb: switch the socket list mutex to a recursive_mutex. 2016-05-18 17:20:30 -07:00
NOTICE
OVERVIEW.TXT
protocol.txt
remount_service.cpp adb: remove exit-time destructors. 2015-11-12 11:20:19 -08:00
remount_service.h
security_log_tags.h ADB security logging 2016-01-21 15:57:02 +00:00
services.cpp Merge changes Ia4a2ff77,I970806e3,I47daa338 into nyc-dev 2016-04-19 00:51:22 +00:00
services.h adb: put legacy shell: service back in. 2015-09-30 15:40:09 -07:00
SERVICES.TXT
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 12:56:52 -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 adb: relax serial matching rules. 2016-03-03 15:46:50 -08:00
socket_test.cpp adb: relax serial matching rules. 2016-03-03 15:46:50 -08:00
sockets.cpp adb: use asocket's close function when closing. 2016-05-18 17:20:30 -07:00
sockets.dia
SYNC.TXT
sysdeps.h adb: make ScopedFd universally accessible and useful. 2016-03-04 19:15:11 -08:00
sysdeps_test.cpp adb: add implementations of mutex, recursive_mutex. 2016-05-18 17:20:30 -07:00
sysdeps_unix.cpp adb: use TCP keepalive. 2016-03-03 15:42:11 -08:00
sysdeps_win32.cpp Merge changes Ia4a2ff77,I970806e3,I47daa338 into nyc-dev 2016-04-19 00:51:22 +00:00
sysdeps_win32_test.cpp adb: allow wine's output for sysdeps_win32 strerror test. 2016-02-22 15:57:08 -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: clean up quotes in test_device.py. 2016-03-03 15:46:51 -08:00
test_track_devices.cpp Track rename of base/ to android-base/. 2015-12-04 22:00:26 -08:00
transport.cpp adb: use a custom thread to poll for usb devices on mac. 2016-04-26 17:00:49 -07:00
transport.h Fix kick_transport test. 2016-04-25 17:37:08 -07:00
transport_local.cpp adb: search for a maximum of 16 emulators. 2016-05-06 11:27:19 -07:00
transport_test.cpp Fix kick_transport test. 2016-04-25 17:37:08 -07:00
transport_usb.cpp Fix kick_transport test. 2016-04-25 17:37:08 -07:00
usb_linux.cpp adb: make adb_thread_func_t return void, add adb_thread_exit. 2016-02-22 15:57:08 -08:00
usb_linux_client.cpp Revert "adb: close ep0 on disconnection." 2016-06-02 17:30:43 -07:00
usb_osx.cpp adb: use a custom thread to poll for usb devices on mac. 2016-04-26 17:00:49 -07:00
usb_windows.cpp adb: make adb_thread_func_t return void, add adb_thread_exit. 2016-02-22 15:57:08 -08:00