From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6224 invoked by alias); 20 Feb 2004 08:01:03 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 6214 invoked from network); 20 Feb 2004 08:01:01 -0000 Received: from unknown (HELO dessent.net) (66.227.14.169) by sources.redhat.com with SMTP; 20 Feb 2004 08:01:01 -0000 Received: from localhost ([127.0.0.1] helo=dessent.net) by dessent.net with esmtp (Exim 4.30) id 1Au5eD-0000rm-I3 for cygwin@cygwin.com; Fri, 20 Feb 2004 08:04:33 +0000 Message-ID: <4035BEBA.BA2A9CC4@dessent.net> Date: Fri, 20 Feb 2004 09:11:00 -0000 From: Brian Dessent Organization: My own little world... MIME-Version: 1.0 To: cygwin@cygwin.com Subject: Re: search and replace tool References: <291592011.20040218205953@thequod.de> <6.0.1.1.0.20040218151724.0398d488@127.0.0.1> <40354B21.6040802@x-ray.at> <40355763.E01A2710@dessent.net> <4035B0EB.50003@corpit.ru> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Reply-To: cygwin@cygwin.com X-SW-Source: 2004-02/txt/msg01038.txt.bz2 Egor Duda wrote: > huh? what do you mean "in-place"? linux writes new file to new place, it > just deletes .bak file afterwards, unlike cygwin. Okay, it's not technically in-place. But perl expects to be able to do the following if you specify "-i": x = open("file"); unlink("file"); y = open("file"); read(x, ...); write(y, ...); When the program ends or the filehandles are closed, there's no further action required, such as removing the backup copy, because it's already been unlinked. Unlinking an open file is not supported by the windows filesystem (?) so this sequence is impossible. To emulate this with Cygwin, new code would have to be added that gets called after fh 'x' is closed to remove the backup copy. I'm no expert on perl internals but it sounds like this has never been done because it's nontrivial. That's all I know. I think Gerrit would be able to comment further on this. Brian -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/