Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Jun 2000 07:57:45 +0100
From:      David Malone <dwmalone@maths.tcd.ie>
To:        Alfred Perlstein <bright@wintelcom.net>
Cc:        Ronaldo Carpio <rncarpio@yahoo.com>, stable@FreeBSD.ORG
Subject:   Re: remove() behavior?
Message-ID:  <20000608075745.A84024@walton.maths.tcd.ie>
In-Reply-To: <20000607210157.B18462@fw.wintelcom.net>; from bright@wintelcom.net on Wed, Jun 07, 2000 at 09:01:57PM -0700
References:  <20000608012333.19196.qmail@web704.mail.yahoo.com> <20000607210157.B18462@fw.wintelcom.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jun 07, 2000 at 09:01:57PM -0700, Alfred Perlstein wrote:
> * Ronaldo Carpio <rncarpio@yahoo.com> [000607 18:25] wrote:
> > 
> > What should the behavior of the remove() stdio function be?  The
> > man page says it's an alias for unlink(),  but Linux and Solaris say
> > it should unlink() files and rmdir() dirs,  and Stevens' APUE agrees.
> 
> The manpage says that our remove():
> 
>      The remove() function conforms to ISO 9899: 1990 (``ISO C'').
> 
> Can you quote from a standard that says otherwise?  (I don't have
> ISO 9899: 1990)

Single unix spec 2 says:

    DESCRIPTION

     The remove() function causes the file named by the pathname pointed
     to by path to be no longer accessible by that name. A subsequent
     attempt to open that file using that name will fail, unless it is
     created anew.

     If path does not name a directory, remove(path) is equivalent to
     unlink(path).

     If path names a directory, remove(path) is equivalent to
     rmdir(path).

It would be pretty easy to change though.

	David.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000608075745.A84024>