summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTony Cook <tony@develop-help.com>2012-07-17 15:48:02 +1000
committerTony Cook <tony@develop-help.com>2012-07-17 15:48:02 +1000
commit4d6399864e7a82ac32047d65a43a064193e46846 (patch)
treea47072856dfd65898b7aafa3802b0b0093dc7616
parent16e4fcbf9950072fae8d7d2f3f58b77db825ee71 (diff)
downloadperl-4d6399864e7a82ac32047d65a43a064193e46846.tar.gz
sync() on a read-only file handle doesn't work on cygwin either
Cygwin fsync() is implemented in terms of the Win32 FlushFileBuffers() API which requires GENERIC_WRITE access.
-rw-r--r--dist/IO/t/io_xs.t5
1 files changed, 4 insertions, 1 deletions
diff --git a/dist/IO/t/io_xs.t b/dist/IO/t/io_xs.t
index 85fbc5668f..b73144794f 100644
--- a/dist/IO/t/io_xs.t
+++ b/dist/IO/t/io_xs.t
@@ -45,7 +45,10 @@ SKIP:
or skip "No fsync", 1;
$^O eq 'aix'
and skip "fsync() documented to fail on non-writable handles on AIX", 1;
+ $^O eq 'cygwin'
+ and skip "fsync() on cygwin uses FlushFileBuffers which requires a writable handle", 1;
open my $fh, "<", "t/io_xs.t"
or skip "Cannot open t/io_xs.t read-only: $!", 1;
- ok($fh->sync, "sync to a read only handle");
+ ok($fh->sync, "sync to a read only handle")
+ or diag "sync(): ", $!;
}