delete selected folder leaves empty dir on disk

Henrique de Moraes Holschuh hmh at debian.org
Sat Jan 11 06:56:18 EST 2003


On Fri, 10 Jan 2003, Rob Siemborski wrote:
> On Fri, 10 Jan 2003, John Alton Tamplin wrote:
> > Since rmdir() doesn't delete it, I assume that means there is some entry
> 
> Well, on linux atleast, rmdir() can fail with EBUSY:
> 
>        EBUSY  pathname  is  the current working directory or root directory of
>               some process.
> 
> On solaris, you do have to be the process selected on the mailbox to hit
> the problem.

There are two ways to fix this:

1) Don't cd to the directory (this fixes the EBUSY problem)
2) Put a tombstone there, and clean up the directory later.

I like (2) a lot more, and it is in tone with
http://bugzilla.andrew.cmu.edu/show_bug.cgi?id=1297

> http://bugzilla.andrew.cmu.edu/show_bug.cgi?id=1268

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh




More information about the Info-cyrus mailing list