lkml.org 
[lkml]   [1996]   [Mar]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: rmdir system call
Hi,

On Wed, 20 Mar 1996 08:39:40 +0000, Nick Randell <nick@metrica.co.uk> said:

> Ulrich Windl wrote:
>>
>> On 20 Mar 96 at 7:26, Nick Randell wrote:
>>
>> > I have some code which is calling rmdir and passing the directory name
>> > is with a trailing '/'.
>> > eg rmdir("/tmp/nick/")
>> > The system call is returning with 'ENOENT'.
>> > The same code works ok on other operating systems. (HPUX, IRIX, AIX ...)

Then they are broken, or at least non-POSIX-compliant --- this isn't
legal for POSIX.

>> > If Linux is wrong, what can I do about it?

It isn't.

> Should you be able to call rmdir with a trailing '/'?

No, you should expect it to always fail, probably with ENOTEMPTY or
EBUSY. According to POSIX, any path ending in "/" is precisely
equivalent for all purposes to the same path with a trailing "."
appended, with the single exception that the trailing "." does not
count towards the pathlength when checking for path-too-long errors.

So, rmdir("/tmp/nick/") should be precisely equivalent to
rmdir("/tmp/nick/."), which should obviously fail.

Cheers,
Stephen.
--
Stephen Tweedie <sct@dcs.ed.ac.uk>
Department of Computer Science, Edinburgh University, Scotland.




\
 
 \ /
  Last update: 2005-03-22 13:36    [W:0.040 / U:0.320 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site