Fix EINTR handling for close

This commit is contained in:
2025-08-23 20:14:24 -04:00
parent 7db0e331e4
commit 18a1b30d9f
6 changed files with 86 additions and 78 deletions

View File

@@ -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();
{