diff options
author | Takashi Yano <takashi.yano@nifty.ne.jp> | 2022-03-12 06:19:53 +0900 |
---|---|---|
committer | Takashi Yano <takashi.yano@nifty.ne.jp> | 2022-03-14 19:38:49 +0900 |
commit | af8a7c13b516c77c1e6092157e23ca26db44b1af (patch) | |
tree | 1bbef9a47143b1bb579a12bd60a3027196dbccc2 | |
parent | b2d4dc167cf9ffd992d88e23dc1d3debadcc2c4b (diff) | |
download | newlib-af8a7c13b516c77c1e6092157e23ca26db44b1af.zip newlib-af8a7c13b516c77c1e6092157e23ca26db44b1af.tar.gz newlib-af8a7c13b516c77c1e6092157e23ca26db44b1af.tar.bz2 |
Cygwin: fsync: Return EINVAL for special files.
- Unlike linux, fsync() calls FlushFileBuffers() even for special
files. This causes the problem reported in:
https://cygwin.com/pipermail/cygwin/2022-March/251022.html
This patch fixes the issue.
-rw-r--r-- | winsup/cygwin/fhandler.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc index 98d7a3b..fc7bf0a 100644 --- a/winsup/cygwin/fhandler.cc +++ b/winsup/cygwin/fhandler.cc @@ -1750,7 +1750,7 @@ fhandler_base::utimens (const struct timespec *tvp) int fhandler_base::fsync () { - if (!get_handle () || nohandle ()) + if (!get_handle () || nohandle () || pc.isspecial ()) { set_errno (EINVAL); return -1; |