This is the mail archive of the cygwin 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: rm seems to fail


greenup greenup wrote:
> On 1/13/09, Mark J. Reed wrote:
>> On Tue, Jan 13, 2009 at 2:52 PM, greenup wrote:
>>  > your perl test was a nice try; but it also did not remove the file,
>>  > which is revealing.
>> I should have included a return code check:
>>  perl -e 'unlink("goo/foo") or die $!'
>
> the return code check worked!! (removed the file)
> WHAT???
>
> I went back and checked my previous tests.
> THEY worked.
> ummm.
>
> I really want to know the root cause, so I'm re-upgrading my cygwin
> dll and coreutils, seeing if the dll was hiding, or some other cause
> of latency... I don't think I did anything else that could have fixed
> the problem.   I haven't messed with my path.  I haven't really
> deleted anything but goo and foo all day.  I'll let you know.

  What AV have you got?  Sometimes your AV can keep a handle open to a file
(for scanning) for some time after you've last accessed it.  If you're trying
to delete it in that window (and this could happen every time automatically if
'rm' does a stat() to check the file exists and is readable right before
calling unlink()), then it might fail because it's in use.  Maybe your AV was
doing that for a while and now it's stopped.... but this is pretty speculative.

    cheers,
      DaveK

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.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]