X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:reply-to:subject:to:references:from:message-id :date:mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=JufOutzixjoIRivh yo6KqcXffDCVwprHhNQehDcNLHoaBrgCVsrtGxRWTaU0BnEKQ46yoKZo14kNX0sH r9sTz/kD1KCWqSWpf+1SdX7jclc+0Mqm3tFx0KWTRwvI4lz8SZxhDnjbR6O0kk6G gQDSNtOyc2VjlB61COvho0toRjU= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:reply-to:subject:to:references:from:message-id :date:mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=qYOgtZCNMuESN/ip+cGczV yXfs8=; b=wW+jscpsV7D7YNBQIZ+g3EXsoIQ1JWvzlhlL2A26tGo4SCqt9LKOI5 KMdB7CvK4Bsc1DZDeIPk+kRpwhtCWeb9Nt6OxNYKAVuCXUICnBOuQ0oc4/xHGAvT zNfNMPmZzGexVVt81/dsZ1iIuTbnm6DyGFTQ7lAjlSVaHZuNY3LVg= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: 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 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 Reply-To: moss AT cs DOT umass DOT edu Subject: Re: find command seems to lock files To: cygwin AT cygwin DOT com References: <20190819140308 DOT GN11632 AT calimero DOT vinschen DOT de> From: Eliot Moss Message-ID: <609c28ca-07da-f150-139b-267448ede826@cs.umass.edu> Date: Mon, 19 Aug 2019 10:06:14 -0400 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 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