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.
This commit is contained in:
parent
b2d4dc167c
commit
af8a7c13b5
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue