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
tree: 5a514cfc2611d5ecc57e3c21e41a630812967825
  1. gki/
  2. system/
  3. Android.mk
  4. CleanSpec.mk
  5. MODULE_LICENSE_APACHE2
  6. NOTICE