Re: rmdir system call

Aaron Crane (AC8@soas.ac.uk)
Wed, 20 Mar 1996 20:42:24 GMT


Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de> wrote:

<snip>

> > Should you be able to call rmdir with a trailing '/'?
>
> Traditionally its invalid, but I think POSIX allows it to support
> more stupid programs; therefore "//bin", "/usr//bin", and "/etc/"
> should all be valid directory names; maybe even combinations of
> these.
> While this makes it easier for application programs, it makes it more
> difficult (inefficient) for the kernel (I think).

Yeah, point taken, but if we put that code into the kernel, then it only
has to exist in one place. If we require it to be done by user code then
every user program has to check (for example) paths supplied by the user
for extra occurrences of /. Anyway, if Posix says so, it *must* be a good
idea ;). Alternatively, perhaps /- stripping could go into libc instead.
Opinions, anyone?

Regards.
--- Aaron Crane, undergrad at SOAS, University of London
Snail: International Hall, Brunswick Square, London, WC1N 1AS, England
Voice: +44 (0)171-837 0746 x7312 (ask for me in room 111)
ObSig: "Object-oriented programming is an exceptionally bad idea which could
only have originated in California." (Edsger Dijkstra)