This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: infinite loop in rm -fr (revisited)


> 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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]