diff options
author | redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2017-01-13 17:52:34 +0000 |
---|---|---|
committer | redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2017-01-13 17:52:34 +0000 |
commit | e847d2dbd3d5c09f160764164be85393ad2588a4 (patch) | |
tree | 94616b49f60488739406bfb9c6fbce8afe5562eb /libstdc++-v3/config | |
parent | 129ea810805a58f8c2e5049d747a9a5e68c23c47 (diff) | |
download | gcc-e847d2dbd3d5c09f160764164be85393ad2588a4.tar.gz |
PR65411 don't retry fclose on EINTR
PR libstdc++/65411
* config/io/basic_file_stdio.cc (__basic_file<char>::close()): Don't
retry fclose on EINTR.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@244451 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/config')
-rw-r--r-- | libstdc++-v3/config/io/basic_file_stdio.cc | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/libstdc++-v3/config/io/basic_file_stdio.cc b/libstdc++-v3/config/io/basic_file_stdio.cc index a0ad82c75fb..e7367016504 100644 --- a/libstdc++-v3/config/io/basic_file_stdio.cc +++ b/libstdc++-v3/config/io/basic_file_stdio.cc @@ -267,16 +267,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { int __err = 0; if (_M_cfile_created) - { - // In general, no need to zero errno in advance if checking - // for error first. However, C89/C99 (at variance with IEEE - // 1003.1, f.i.) do not mandate that fclose must set errno - // upon error. - errno = 0; - do - __err = fclose(_M_cfile); - while (__err && errno == EINTR); - } + __err = fclose(_M_cfile); _M_cfile = 0; if (!__err) __ret = this; |