This is the mail archive of the
mailing list for the Cygwin project.
Re: infinite loop in rm -fr (revisited)
- From: "Chris January" <chris at atomice dot net>
- To: <cygwin at cygwin dot com>
- Date: Tue, 2 Jul 2002 20:30:17 +0100
- Subject: Re: infinite loop in rm -fr (revisited)
- References: <3D21F96C.email@example.com>
> 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:
> 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. :(((
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html