X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.4 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Message-ID: <4C8FA533.10306@ixiacom.com> Date: Tue, 14 Sep 2010 09:39:15 -0700 From: Earl Chew User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.2.9) Gecko/20100825 Thunderbird/3.1.3 MIME-Version: 1.0 To: Subject: Re: Deletion race in NtSetFileInformation ? (Directory not empty error in rm -r -f) References: <20100914083821 DOT GF16534 AT calimero DOT vinschen DOT de> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit 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 > There shouldn't be any race. When you set the delete disposition, > the file is actually deleted as soon as the last handle to the file > is closed. If the file isn't opened by another process, it will > disappear right at the NtClose at the end of unlink_nt. Please note > that the call to check_dir_not_empty already takes place *only* if > trying to open the directory failed with STATUS_SHARING_VIOLATION. > So there *was* another process blocking things. Corinna, Yes, I noticed that check wrt STATUS_SHARING_VIOLATION. These actions are performed consequential to a shell script, that launches a Makefile, that performs the rm -r -f ... so within that context there is definitely scope for oversight and we might inadvertently have a process getting in the way. When you describe the other process blocking things, what might that other process be doing? I presume that other process having the directory in question open, or as cwd is sufficient. Is there anything else I should be on the lookout for? Earl -- 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