From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30316 invoked by alias); 19 Aug 2019 14:06:18 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 30276 invoked by uid 89); 19 Aug 2019 14:06:18 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-0.5 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.1 spammy=HX-Languages-Length:1254, HContent-Transfer-Encoding:8bit X-HELO: mailsrv.cs.umass.edu Received: from mailsrv.cs.umass.edu (HELO mailsrv.cs.umass.edu) (128.119.240.136) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 19 Aug 2019 14:06:16 +0000 Received: from [192.168.0.8] (cpe-108-183-164-222.maine.res.rr.com [108.183.164.222]) by mailsrv.cs.umass.edu (Postfix) with ESMTPSA id 228E0401A595; Mon, 19 Aug 2019 10:06:15 -0400 (EDT) Reply-To: moss@cs.umass.edu Subject: Re: find command seems to lock files To: cygwin@cygwin.com References: <20190819140308.GN11632@calimero.vinschen.de> From: Eliot Moss Message-ID: <609c28ca-07da-f150-139b-267448ede826@cs.umass.edu> Date: Mon, 19 Aug 2019 14:13:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20190819140308.GN11632@calimero.vinschen.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2019-08/txt/msg00279.txt.bz2 On 8/19/2019 10:03 AM, Corinna Vinschen wrote: > On Aug 19 14:33, Morten Kjærulff wrote: >> Hi, >> >> I have an application which constantly: >> creates a file >> do some processing >> deletes the file >> >> One way to monitor if the application has crashed, is to check the age of >> the file, so I made a script that: >> >> find //$server/d$/dir/subdir*/subsubdir -name 'thefile' -printf '%A+\n' >> >> subdir* will be subdir1 subdir2 ... >> under subsubdir there will be dirA, dirB, ... and under those, thefile may >> exist. >> >> Problem is that it seems this command locks thefile, as the application >> sometimes can't delete it. >> >> Could this be true? > > Cygwin does not actually lock anything except in very rare > circumstances. Your problem is more likely triggered by a realtime > virus scanner. I was wondering, though, whether the parent directory would be non-delete-able while find has the directory open for scanning. If the application in question creates and deletes the parent directory, as well as the leaf file, then things would be left around unexpectedly. So would use of find trigger a virus scanner, which in turn might hold on to the file and prevent its deletion? Regards - Eliot -- 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