Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!ogicse!orstcs!thyphy.physics.orst.edu!ghe From: ghe@physics.orst.edu (Guangliang He) Newsgroups: comp.unix.aix Subject: Re: Why remove() doesn't remove (symbolic links)? Keywords: remove(), symbolic link Message-ID: <1991May03.202209.432@lynx.CS.ORST.EDU> Date: 3 May 91 20:22:09 GMT References: <1991May03.174126.13324@lynx.CS.ORST.EDU> <1991May3.185244.1275@batcomputer.tn.cornell.edu> Sender: @lynx.CS.ORST.EDU Reply-To: ghe@physics.orst.edu Organization: Dept. of Physics, Oregon State University Lines: 34 Nntp-Posting-Host: thyphy.physics.orst.edu In article <1991May3.185244.1275@batcomputer.tn.cornell.edu>, shore@theory.tn.cornell.edu (Melinda Shore) writes: |> In article <1991May03.174126.13324@lynx.CS.ORST.EDU> ghe@physics.orst.edu writes: |> >The remove() system call fails to remove |> >the sybolic links. |> |> It should work as advertised. Which way??? should remove or not??? TFM did not mention a single word on symbolic links. |> I *strongly* recommend checking errno |> after the system call fails either by using perror(), or looking at the |> value of errno yourself. You do want to know why remove() is failing, |> don't you? Yes. I DO want to know why. But TFM says nothing about errno. It only mentioned that 0 is returned upon successful completion, and non-zero otherwise. When I try to call remove(b) ('b' is a symbolic link to a directory 'a'), perror prints: remove: Not a directory I still don't know why. |> -- |> Software longa, hardware brevis |> Melinda Shore - Cornell Information Technologies - shore@theory.tn.cornell.edu --- Guangliang He | If anything can go wrong, it will. ghe@physics.orst.edu | -- Murphy's Law