From 46808b2623f5ea68899a26bf3fa9782c6425cb69 Mon Sep 17 00:00:00 2001 From: Myles Watson Date: Mon, 21 Sep 2020 10:44:32 -0700 Subject: [PATCH] HciHalTest: Handle EINTR when reading Bug: 168760472 Tag: #stability Test: atest bluetooth_test_gd Change-Id: I3b2cb84a5a4674ed6018124c3a9c0e90d8cafc7b --- gd/hal/hci_hal_host_rootcanal_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gd/hal/hci_hal_host_rootcanal_test.cc b/gd/hal/hci_hal_host_rootcanal_test.cc index 882cf6b29..fde63891a 100644 --- a/gd/hal/hci_hal_host_rootcanal_test.cc +++ b/gd/hal/hci_hal_host_rootcanal_test.cc @@ -241,7 +241,7 @@ size_t read_with_retry(int socket, uint8_t* data, size_t length) { size_t bytes_read = 0; ssize_t bytes_read_current = 0; do { - bytes_read_current = read(socket, data + bytes_read, length - bytes_read); + RUN_NO_INTR(bytes_read_current = read(socket, data + bytes_read, length - bytes_read)); bytes_read += bytes_read_current; } while (length > bytes_read && bytes_read_current > 0); return bytes_read; -- 2.11.0