Please test latest developer snapshot

Corinna Vinschen corinna-cygwin@cygwin.com
Sun Feb 20 12:16:00 GMT 2011


On Feb 19 13:34, Warren Young wrote:
> On 2/19/2011 11:35 AM, Warren Young wrote:
> >On 2/19/2011 11:29 AM, Warren Young wrote:
> >>$ rmdir .
> >>rmdir: failed to remove `.': Invalid argument
> >
> >Nevermind. It doesn't work on Linux, either. I guess /bin/rmdir has code
> >in it to check for that, which rmdir(2) does not.
>> Better test, which does work with 20110215, and which proves it's
> rmdir(1) being too clever, but not so clever it can't be outsmarted:
>> 	$ mkdir foo
> 	$ cd foo
> 	$ rmdir ../foo
>> Eat that, rmdir(1)!

It's not missing cleverness of rmdir(1) but by design of the rmdir(2)
function per POSIX. See
http://pubs.opengroup.org/onlinepubs/9699919799/functions/rmdir.html
 "If the path argument refers to a path whose final component is either
 dot or dot-dot, rmdir() shall fail.
Corinna
-- 
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com
Red Hat
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple


More information about the Cygwin mailing list

AltStyle によって変換されたページ (->オリジナル) /