Fix EINTR handling for close
This commit is contained in:
@@ -90,10 +90,11 @@ TEST_CASE(
|
||||
CHECK(std::string(buffer, bytes_read) == std::string(test_message));
|
||||
|
||||
// Cleanup
|
||||
int e;
|
||||
do {
|
||||
e = close(client_fd);
|
||||
} while (e == -1 && errno == EINTR);
|
||||
int e = close(client_fd);
|
||||
if (e == -1 && errno != EINTR) {
|
||||
perror("close client_fd");
|
||||
abort();
|
||||
}
|
||||
server->shutdown();
|
||||
server_thread.join();
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user