Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm 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 X-WM-Posted-At: avacado.atomice.net; Tue, 2 Jul 02 20:30:17 +0100 Message-ID: <00d001c221fe$e5b242f0$0100a8c0@advent02> From: "Chris January" To: References: <3D21F96C DOT 50603 AT hekimian DOT com> Subject: Re: infinite loop in rm -fr (revisited) Date: Tue, 2 Jul 2002 20:30:17 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 > There was a thread back in April on this topic and I would like to know > whether it was ever resolved. > > The following script will demonstrate the infinite loop: > > #!/bin/bash > trap "cd /; rm-orig -fr /tmp/xxx.dir" 0 > mkdir /tmp/xxx.dir > exec >/tmp/xxx.dir/info > > The problem appears to be that "info" stays in the directory > even though it has been deleted (presumably because the script > has the file open). > > Seems like the general solution is to move the file elsewhere before > deleting it. Perhaps to a reserved directory on the root of the drive? I tried to look into this and typed: strace bash -c ./loop which prompty resulted in bash segfaulting. :((( Chris -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/