From owner-freebsd-current Sat Jun 16 0:28:58 2001 Delivered-To: freebsd-current@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id 007E537B407 for ; Sat, 16 Jun 2001 00:28:56 -0700 (PDT) (envelope-from bde@zeta.org.au) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id RAA14825; Sat, 16 Jun 2001 17:28:46 +1000 Date: Sat, 16 Jun 2001 17:27:00 +1000 (EST) From: Bruce Evans X-Sender: bde@besplex.bde.org To: "Steve O'Hara-Smith" Cc: david@catwhisker.org, current@FreeBSD.ORG Subject: Re: symlink(2) [Was: Re: tcsh.cat] In-Reply-To: <20010616085651.29684596.steveo@eircom.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sat, 16 Jun 2001, Steve O'Hara-Smith wrote: > On Sat, 16 Jun 2001 14:34:07 +1000 (EST) > Bruce Evans wrote: > BE> cp is also broken for symlinks to valid pathnames for nonexistent files; > BE> > BE> $ rm -f foo > BE> $ ln -s /nonesuch foo > BE> $ cp foo bar > BE> > BE> This duplicates foo as a symlink, but should just fail. > > This is correct behaviour IMHO - why on earth should it fail. If I > copy a directory containing symlinks I don't want them do vanish just because > the target is unavailable. Because cp copies file contents, not file nodes (unless the -R flag is specified). This is clarified in current POSIX drafts. gnu cp gets this right. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message