infinite loop in rm -fr (revisited)
Chris January
chris@atomice.net
Tue Jul 2 12:35:00 GMT 2002
> 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/
More information about the Cygwin
mailing list