Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-ID: <03F4742D8225D21191EF00805FE62B9908E23F92@aa-msg-01.medstat.com> From: John Wiersba To: "'cygwin'" Subject: unlink() problem Date: Tue, 31 Jul 2001 18:22:35 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: text/plain; charset="iso-8859-1" I'm having a problem with unlink(). I've scanned the FAQ and searched some in the newsgroup archives for information about the following problem. I did find a post (see http://sources.redhat.com/ml/cygwin/2001-05/msg01095.html) but no apparent resolution. $ touch asdf $ perl -i -pe 1 asdf Can't do inplace edit on asdf: Permission denied. What perl is doing is equivalent to: $ perl -e ' open A, "< asdf" or die "one $!"; # open asdf for read unlink "asdf"; open B, "> asdf" or die "two $!"; # open asdf for write while () { print B } # copy from A to B ' two Permission denied at -e line 4. The problem: after the unlink(), I can't open the same filename for write as I can on unix. If I pause the program after unlinking asdf, it is still there and can be seen by ls, but can't be read by ls -l. Is there a workaround for this behavior? Is it considered a bug or is it just a quirk of the cygwin implementation of trying to implement unix filesystem semantics on top of windows? -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/