X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=0.1 required=5.0 tests=AWL,BAYES_00,SARE_HELO_EQ_CUST,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com From: Jean-Pierre Bergamin Subject: Re: less locks the file Date: Tue, 21 Jun 2011 16:38:35 +0200 Lines: 36 Message-ID: References: <20110621081809 DOT GO3437 AT calimero DOT vinschen DOT de> <20110621101610 DOT GR3437 AT calimero DOT vinschen DOT de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; de; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 In-Reply-To: <20110621101610.GR3437@calimero.vinschen.de> X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Am 21.06.2011 12:16, schrieb Corinna Vinschen: > On Jun 21 12:03, Jean-Pierre Bergamin wrote: >> Am 21.06.2011 10:18, schrieb Corinna Vinschen: >>> On Jun 21 09:50, Jean-Pierre Bergamin wrote: >>>> Dear cygwin-Users >>>> >>>> When using less to follow a log file (less +F logfile.log), this >>>> file is locked. So when I restart the application, it cannot delete >>>> this locked log file and create a new one. So I always have to quit >>>> less, before restarting the app, which I of course forget like every >>>> 2nd time... less does not lock on linux. >>>> >>>> Is there any way I could tell less not to lock the file? >>> >>> Upgrade Cygwin to the latest release might be an option. It's not less >>> which locks the file, it's the fact that Windows does not allow to >>> delete files which are in use. Recent Cygwin versions have a workaround >>> for this. >> >> Unfortunately, it also does not work with the latest cygwin version. >> It seems to be some "special" behaviour with my app server anyway, >> since I can open any other file with less and delete it and recreate >> it, while less still has it open. No idea why the app server (virgo) >> fails. > > It's probably because your app server is a non-Cygwin application. It > fails because it has no code to move in-use files away, as Cygwin's > unlink() function has. If so, you're out of luck. Yes. It's a java app server. So I'm probably really out of luck. But thank you anyway! Best Regards, James -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple