Why remove() doesn't remove (symbolic links)?

Guangliang He ghe at physics.orst.edu
Sat May 4 03:41:26 AEST 1991


The title pretty much said it all. The remove() system call fails to remove
the sybolic links. The man page of remove() did mention anything special 
about symolic links. 

Here is a little program shows the problem:
------
#include <stdio.h>

main(int argc, char **argv)
{
    if (remove(argv[1]))
	fprintf(stderr, "can't remove %s\n", argv[1]);
}
------

It works fine (no error message) with regular files but prints the 
'can't remove.." message on symbolic links. 

Is it a bug or 'work as designed' :-(???

---
  Guangliang He                |   If anything can go wrong, it will.
  ghe at physics.orst.edu         |            -- Murphy's Law



More information about the Comp.unix.aix mailing list