OSDN Git Service

DO NOT MERGE ANYWHERE Restart failed system calls interrupted with errno of EINTR
authorPavlin Radoslavov <pavlin@google.com>
Thu, 12 May 2016 18:36:44 +0000 (11:36 -0700)
committerZach Johnson <zachoverflow@google.com>
Tue, 17 May 2016 17:11:57 +0000 (10:11 -0700)
commitf9a4d9e8bf63b006bec9c30f6dc430ac5d30a85b
treebc5655476b967620ceb8772fbf5e45f7bd8ee66e
parent6f6949ff93d3e370cf72b0e18673a7749bfdfa0f
DO NOT MERGE ANYWHERE Restart failed system calls interrupted with errno of EINTR

In number of places we don't handle properly system calls failures
when the errno is EINTR (i.e., the system call was interrupted
by a signal). In all our use cases, the system calls should be
restarted. The handling of the following system calls (as used in the code)
has been updated/fixed:

  poll, send, recv, sendmsg, nanosleep, epoll_wait
  read - mostly (e.g., socket-like fds)
  write - mostly (e.g., socket-like fds)
  select, accept, connect

Bug: 28471477
Bug: 28658141
Change-Id: I03e6f0f67e33876780fb6d02c33eb84547ba8f95
19 files changed:
audio_a2dp_hw/audio_a2dp_hw.c
btif/co/bta_hh_co.c
btif/co/bta_hl_co.c
btif/src/btif_hl.c
btif/src/btif_pan.c
btif/src/btif_sock_l2cap.c
btif/src/btif_sock_rfc.c
btif/src/btif_sock_thread.c
btif/src/btif_sock_util.c
hci/src/btsnoop_net.c
hci/src/hci_hal_h4.c
hci/src/hci_hal_mct.c
osi/include/osi.h
osi/include/socket.h
osi/src/eager_reader.c
osi/src/reactor.c
osi/src/socket.c
tools/hci/main.c
udrv/ulinux/uipc.c