On Mon, Jul 9, 2012 at 3:59 PM, Arno Hautala <[email protected]> wrote:
> On Mon, Jul 9, 2012 at 3:45 PM, Macs R We <[email protected]> wrote:
>>
>> This is all true on the Darwin level, but there is some extra voodoo 
>> associated with the Trash subsystem.  From the Terminal, the file can be 
>> rm'ed with no complaint at all, meaning the underlying OS is happy and all 
>> streams are closed.  But there is some extra bookkeeping going on at the 
>> Locum level, which is failing.
>
> I don't think I've ever seen rm fail to delete a file because it's
> been in use, even on traditional *nix systems. In fact, if I remember
> correctly, I'll notice that Trash is stuck on a file (in use), lsof
> will list the file as in use by Finder or some other process, rm
> completes successfully, and lsof no longer lists the file as in use.

Further, I just tested this on an Ubuntu system by copying the
/bin/sleep binary, running that, deleting the copy, and checking lsof.
It's still listed as in use, but marked as "deleted", having been
loaded into memory.

Aside from remaining in the lsof output, this matches what I've seen
on OS X (and why I asked previously about running lsof to check the
stuck files to see which process owns them). I assume the file
disappears from lsof after being rm-ed because the Finder or another
app notices the deletion and cleans up. Or maybe it's the OS realizing
that the file can be released.

-- 
arno  s  hautala    /-|   [email protected]

pgp b2c9d448
_______________________________________________
MacOSX-talk mailing list
[email protected]
http://www.omnigroup.com/mailman/listinfo/macosx-talk

Reply via email to