aboutsummaryrefslogtreecommitdiffstats
path: root/src/libmdsclient
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2015-10-11 04:13:13 +0200
committerMattias Andrée <maandree@operamail.com>2015-10-11 04:13:13 +0200
commit0a85228ff762b77de2d47119d1379e7ca6f48eb8 (patch)
treee2e936730368062cbafb42e6be6e8b57d5b192ce /src/libmdsclient
parentwhoops (diff)
downloadmds-0a85228ff762b77de2d47119d1379e7ca6f48eb8.tar.gz
mds-0a85228ff762b77de2d47119d1379e7ca6f48eb8.tar.bz2
mds-0a85228ff762b77de2d47119d1379e7ca6f48eb8.tar.xz
Whilst POSIX leaves it explicitly unspecify whether close(2) closes the fildes on interruption, Linux (and possibly some other kernels) specify that it does close.
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r--src/libmdsclient/comm.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/libmdsclient/comm.c b/src/libmdsclient/comm.c
index 6c72e9f..7a3ba20 100644
--- a/src/libmdsclient/comm.c
+++ b/src/libmdsclient/comm.c
@@ -86,12 +86,7 @@ void libmds_connection_destroy(libmds_connection_t* restrict this)
if (this->socket_fd >= 0)
{
- while (close(this->socket_fd))
- {
- if (errno == EINTR)
- continue;
- break; /* errno may be EBADF or EIO. */
- }
+ close(this->socket_fd); /* TODO Linux closes the filedescriptor on EINTR, but POSIX does not require that. */
this->socket_fd = -1;
}