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: <4C8FCDC7.3030104@ixiacom.com> Date: Tue, 14 Sep 2010 12:32:23 -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> <4C8FA533 DOT 10306 AT ixiacom DOT com> 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 Corinna Vinschen wrote: > ...or having a cwd below the directory. Trying to remove a directory > which is the CWD of some process is the most common reason that the > directory is blocked, because the Win32 CWD is opened without the > FILE_SHARE_DELETE flag. Especially something like `rm -rf ../foo' > is suspicious, if foo is the CWD of the current shell. Hmm ... the other thing that I just remembered is that I first noticed this problem on 1.7.5-1 on Win7, and the thing that made me suspicious was that replacing the offending command with: strace rm -f -r ... made the command suddenly work! But ... sleep 1 ; rm -f -r ... failed in the same way :-( I haven't tried reproducing this particular behaviour on 1.7.7 (yet). 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