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: <80575AFA5F0DD31197CE00805F650D7602CFAF@wilber.adroit.com> From: "Robinow, David" To: "'cygwin'" Subject: RE: unlink() problem Date: Thu, 9 Aug 2001 12:31:08 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: text/plain; charset="iso-8859-1" > -----Original Message----- > From: Robinow, David [mailto:drobinow AT dayton DOT adroit DOT com] > Sent: Wednesday, August 08, 2001 4:37 PM > Subject: RE: unlink() problem > > ... The net result is that you lose your data. > > > > I can't think of anyway around it except to know that you > can't do inplace > > editing on cygwin. > > > > -- John Wiersba > > > > >$ touch asdf > > > >$ perl -i -pe 1 asdf > > > >Can't do inplace edit on asdf: Permission denied. > But using ActiveState perl, > > D:\home>perl -i -pe 1 asdf > Can't do inplace edit without backup. > > and the file's not clobbered. > Time to look at the perl source code. The following seems to do the trick. --- perl-5.6.1-1/doio.c Thu Aug 9 11:34:16 2001 +++ perl-5.6.1-1/doio.c~ Sun Dec 17 23:46:49 2000 @@ -655,7 +655,7 @@ #endif } else { -#if !defined(DOSISH) && !defined(AMIGAOS) && !defined(__CYGWIN__) +#if !defined(DOSISH) && !defined(AMIGAOS) # ifndef VMS /* Don't delete; use automatic file versioning */ if (UNLINK(PL_oldname) < 0) { if (ckWARN_d(WARN_INPLACE)) -- 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/