SCO remove() and unlink()

Gert Doering gert at greenie.muc.de
Tue Dec 19 09:38:11 EST 2000


Hi,

On Mon, Dec 18, 2000 at 06:45:23PM +0100, Kevin Steves wrote:
> On Mon, 18 Dec 2000, Gert Doering wrote:
> : OTOH, we don't need a bsd-remove.c - just add something like
> : 
> : #ifndef HAVE_REMOVE
> : # define remove(a) unlink(a)
> : #endif
> 
> remove() can also delete directories.

Not according to my man page.  I checked various, but the clearest is
FreeBSD's:

DESCRIPTION
     The remove() function is an alias for the unlink(2) system call.  It
     deletes the file referenced by path.
...
ERRORS
     The remove() function may fail and set errno for any of the errors speci-
     fied for the routine unlink(2).

unlink(2) lists in turn:

     [EPERM]         The named file is a directory.


gert

-- 
USENET is *not* the non-clickable part of WWW!
                                                           //www.muc.de/~gert/
Gert Doering - Munich, Germany                             gert at greenie.muc.de
fax: +49-89-35655025                        gert.doering at physik.tu-muenchen.de





More information about the openssh-unix-dev mailing list