summaryrefslogtreecommitdiff
path: root/mysys
diff options
context:
space:
mode:
authorDaniel Black <daniel@linux.ibm.com>2019-02-06 08:28:48 +1100
committerSergey Vojtovich <svoj@mariadb.org>2019-02-13 18:28:12 +0400
commit44898d28f0f2185a4a8ff109c58972d28b8cae95 (patch)
treeae29e75bf724ffb1bed1d1ca35a1ce66195199ab /mysys
parent8a3a332bc083d4900431da65e2375a1f89ad02f6 (diff)
downloadmariadb-git-44898d28f0f2185a4a8ff109c58972d28b8cae95.tar.gz
my_close: Don't retry on close
According to close(2) "Retrying the close() after a failure return is the wrong thing to do" Even the EINTR case its maybe closed. Take the prudent approach here an risk leaking one file descriptor rather than closing one that is nolonger ours.
Diffstat (limited to 'mysys')
-rw-r--r--mysys/my_open.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/mysys/my_open.c b/mysys/my_open.c
index 54e53089da9..92e46610100 100644
--- a/mysys/my_open.c
+++ b/mysys/my_open.c
@@ -89,10 +89,7 @@ int my_close(File fd, myf MyFlags)
my_file_info[fd].type= UNOPEN;
}
#ifndef _WIN32
- do
- {
- err= close(fd);
- } while (err == -1 && errno == EINTR);
+ err= close(fd);
#else
err= my_win_close(fd);
#endif