This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
cygwin port
authorFifer, Eric <EFifer@sanwaint.com>
Fri, 18 Aug 2000 17:30:05 +0000 (18:30 +0100)
committerJarkko Hietaniemi <jhi@iki.fi>
Fri, 18 Aug 2000 18:10:39 +0000 (18:10 +0000)
Message-ID: <779F20BCCE5AD31186A50008C75D9979171784@silldn_mail1.sanwaint.com>

p4raw-id: //depot/perl@6700

lib/File/Temp.pm

index bf24ed3..6fa58e3 100644 (file)
@@ -1517,7 +1517,9 @@ sub unlink0 {
     print "Link count = $fh[3] \n" if $DEBUG;
 
     # Make sure that the link count is zero
-    return ( $fh[3] == 0 ? 1 : 0);
+    # - Cygwin provides deferred unlinking, however,
+    #   on Win9x the link count remains 1
+    return ( $fh[3] == 0 or $^O eq 'cygwin' ? 1 : 0);
 
   } else {
     _deferred_unlink($fh, $path, 0);