platform_system_core/adb
Elliott Hughes 65433da1cb Avoid SIGPIPE in adb.
We're now able to send packets faster than the device can handle them,
meaning that sometimes we're several packets through before the device
says "hey, wait, I can't write" and closes the connection. At best this
led to us reporting that we couldn't sync because "Connection reset";
at worst we'd get SIGPIPE because we were still streaming to a connection
that had already been closed.

This change renames adb_main adb_server_main, and moves the ignoring of
SIGPIPE into adb_commandline so it applies to both client and server (but
not adbd).

This change doesn't address the "wrong error message" part of the problem,
but at least it means you'll get *an* error message.

Bug: http://b/25230872
Change-Id: Ic60e4d13ed03fdcdf0d5cbc97201ebd1097c16ed
2015-11-20 09:42:23 -08:00
..
client Avoid SIGPIPE in adb. 2015-11-20 09:42:23 -08:00
daemon Fix typo, caps in error messages. 2015-11-11 11:34:14 -08:00
.clang-format adb: add 100 column limit to .clang-format. 2015-11-11 14:16:07 -08:00
adb.cpp adb: fix adb client running out of sockets on Windows 2015-10-30 16:23:10 -07:00
adb.h Avoid SIGPIPE in adb. 2015-11-20 09:42:23 -08: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: use VLOG() to replace D() for verbose logging. 2015-09-23 12:53:38 -07:00
adb_auth_host.cpp adb: win32: remove widen()/narrow() in favor of UTF8ToWide()/WideToUTF8() 2015-11-12 17:13:08 -08:00
adb_client.cpp adb: fix adb client running out of sockets on Windows 2015-10-30 16:23:10 -07:00
adb_client.h
adb_io.cpp adb: fix adb client running out of sockets on Windows 2015-10-30 16:23:10 -07: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 Fix lseek argument order. 2015-10-20 13:18:22 -07:00
adb_listeners.cpp adb: clean up transport disconnect operations. 2015-08-28 16:36:00 -07:00
adb_listeners.h
adb_trace.cpp adb/base: minor compiler portability improvements 2015-11-09 10:22:13 -08:00
adb_trace.h Adb: use VLOG() to replace D() for verbose logging. 2015-09-23 12:53:38 -07:00
adb_utils.cpp adb/base: minor compiler portability improvements 2015-11-09 10:22:13 -08:00
adb_utils.h adb: keep file flags in fdevent_install. 2015-10-06 16:15:30 -07:00
adb_utils_test.cpp adb: make adb_basename match the POSIX behavior. 2015-11-04 14:21:35 -08:00
Android.mk adb: don't link against libcutils on Windows. 2015-11-16 16:17:16 -08:00
commandline.cpp Avoid SIGPIPE in adb. 2015-11-20 09:42:23 -08:00
console.cpp adb: fix adb client running out of sockets on Windows 2015-10-30 16:23:10 -07:00
CPPLINT.cfg
fdevent.cpp adb: remove exit-time destructors. 2015-11-12 11:20:19 -08:00
fdevent.h Add unit tests for local socket. 2015-09-16 15:00:59 -07:00
fdevent_test.cpp adb: keep file flags in fdevent_install. 2015-10-06 16:15:30 -07:00
file_sync_client.cpp adb: don't use adb_dirname in between getting and printing errno. 2015-11-17 14:41:57 -08:00
file_sync_service.cpp adb: make mkdirs/secure_mkdirs do what they say. 2015-11-04 14:51:23 -08:00
file_sync_service.h adb: allow multiple args to push/pull. 2015-11-02 12:48:24 -08:00
framebuffer_service.cpp
get_my_path_darwin.cpp
get_my_path_linux.cpp
jdwp_service.cpp adb: keep file flags in fdevent_install. 2015-10-06 16:15:30 -07:00
line_printer.cpp adb: win32: remove widen()/narrow() in favor of UTF8ToWide()/WideToUTF8() 2015-11-12 17:13:08 -08:00
line_printer.h Show transfer progress in adb sync/pull/push. 2015-10-30 14:19:23 -07:00
MODULE_LICENSE_APACHE2
mutex_list.h adb: add basename_lock to mutex_list.h. 2015-11-06 12:19:23 -08: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
services.cpp Pass $TERM to the device. 2015-11-16 10:55:34 -08:00
services.h adb: put legacy shell: service back in. 2015-09-30 15:40:09 -07:00
SERVICES.TXT adb sync cleanup. 2015-08-24 11:15:01 -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 Pass $TERM to the device. 2015-11-16 10:55:34 -08:00
shell_service.h Pass $TERM to the device. 2015-11-16 10:55:34 -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 Pass $TERM to the device. 2015-11-16 10:55:34 -08:00
socket.h Add unit tests for local socket. 2015-09-16 15:00:59 -07:00
socket_test.cpp adb: detect sockets in CLOSE_WAIT state to prevent socket leak on linux. 2015-09-30 15:03:26 -07:00
sockets.cpp adb/base: minor compiler portability improvements 2015-11-09 10:22:13 -08:00
sockets.dia
SYNC.TXT adb sync cleanup. 2015-08-24 11:15:01 -07:00
sysdeps.h adb: win32: remove widen()/narrow() in favor of UTF8ToWide()/WideToUTF8() 2015-11-12 17:13:08 -08:00
sysdeps_win32.cpp adb: win32: remove widen()/narrow() in favor of UTF8ToWide()/WideToUTF8() 2015-11-12 17:13:08 -08:00
sysdeps_win32_test.cpp adb: create unix_isatty() function. 2015-11-02 16:44:34 -08:00
test_adb.py adb: fix adb client running out of sockets on Windows 2015-10-30 16:23:10 -07:00
test_track_devices.cpp
transport.cpp adb: remove exit-time destructors. 2015-11-12 11:20:19 -08:00
transport.h use new cmd command 2015-11-06 18:00:05 -08:00
transport_local.cpp Adb: use VLOG() to replace D() for verbose logging. 2015-09-23 12:53:38 -07:00
transport_test.cpp adb: fix adbd feature parsing for no features. 2015-09-25 13:10:17 -07:00
transport_usb.cpp Adb: use VLOG() to replace D() for verbose logging. 2015-09-23 12:53:38 -07:00
usb_linux.cpp adb: remove exit-time destructors. 2015-11-12 11:20:19 -08:00
usb_linux_client.cpp adbd: Add os descriptor support for adb. 2015-10-07 06:04:00 +00:00
usb_osx.cpp Adb: use VLOG() to replace D() for verbose logging. 2015-09-23 12:53:38 -07:00
usb_windows.cpp adb: win32: Unicode USB device names 2015-11-12 20:13:21 -08:00