From owner-freebsd-bugs Sat Jul 6 2:19:17 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 864B337B400; Sat, 6 Jul 2002 02:19:15 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 382A843E09; Sat, 6 Jul 2002 02:19:15 -0700 (PDT) (envelope-from jon@FreeBSD.org) Received: from freefall.freebsd.org (jon@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.4/8.12.4) with ESMTP id g669JFJU024252; Sat, 6 Jul 2002 02:19:15 -0700 (PDT) (envelope-from jon@freefall.freebsd.org) Received: (from jon@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g669JElu024247; Sat, 6 Jul 2002 02:19:14 -0700 (PDT) Date: Sat, 6 Jul 2002 02:19:14 -0700 (PDT) From: Jonathan Chen Message-Id: <200207060919.g669JElu024247@freefall.freebsd.org> To: doconnor@gsoft.com.au, jon@FreeBSD.org, freebsd-bugs@FreeBSD.org Subject: Re: bin/39217: cp returns non-zero when copying a symlink to it's linkee. Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Synopsis: cp returns non-zero when copying a symlink to it's linkee. State-Changed-From-To: open->closed State-Changed-By: jon State-Changed-When: Sat Jul 6 02:15:04 PDT 2002 State-Changed-Why: this is expected behavior. As noted in the man page, "If cp detects an attempt to copy a file to itself, the copy will fail." And failures are best detected by setting a non-zero exit status. In any case, if cp didn't actually do any copying, it should return an error, much like trying to copy a nonexistant file will return an error. If you have a compelling reason why cp should return 0, let me know and I will reopen the PR. http://www.freebsd.org/cgi/query-pr.cgi?pr=39217 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message