Commit 44898d28 authored by Daniel Black's avatar Daniel Black Committed by Sergey Vojtovich

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.
parent 8a3a332b
......@@ -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);
#else
err= my_win_close(fd);
#endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment