From owner-freebsd-hackers@FreeBSD.ORG Wed May 24 01:27:53 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0628716A592 for ; Wed, 24 May 2006 01:27:52 +0000 (UTC) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (gate.funkthat.com [69.17.45.168]) by mx1.FreeBSD.org (Postfix) with ESMTP id C6BBD43D4C for ; Wed, 24 May 2006 01:27:51 +0000 (GMT) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (ndq43a9fc27y8gtw@localhost.funkthat.com [127.0.0.1]) by hydrogen.funkthat.com (8.13.4/8.13.3) with ESMTP id k4O1RmJJ061122; Tue, 23 May 2006 18:27:48 -0700 (PDT) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.13.4/8.13.3/Submit) id k4O1RlVF061121; Tue, 23 May 2006 18:27:47 -0700 (PDT) (envelope-from jmg) Date: Tue, 23 May 2006 18:27:47 -0700 From: John-Mark Gurney To: "gs_stoller@juno.com" Message-ID: <20060524012747.GB49081@funkthat.com> Mail-Followup-To: "gs_stoller@juno.com" , freebsd-hackers@freebsd.org References: <20060523.182218.19235.1026225@webmail29.nyc.untd.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060523.182218.19235.1026225@webmail29.nyc.untd.com> User-Agent: Mutt/1.4.2.1i X-Operating-System: FreeBSD 5.4-RELEASE-p6 i386 X-PGP-Fingerprint: B7 EC EF F8 AE ED A7 31 96 7A 22 B3 D8 56 36 F4 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html Cc: freebsd-hackers@freebsd.org Subject: Re: The 'ln -s' command X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: John-Mark Gurney List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2006 01:27:57 -0000 gs_stoller@juno.com wrote this message on Wed, May 24, 2006 at 01:21 +0000: > I tried the 'ln -s' command in bothe 4.3 & 4.7 in a situation where it should fail and it did, but it still had a return/exit code of 0 , I think it should have been nonzero. I tried 'ln -s a b' where the file b existed (and was a directory) and I wanted to create the file named a also pointing to it. The correct form was 'ln -s b a'. > > FreeBSD 4.3-RELEASE FreeBSD 4.3-RELEASE #0: Sat Apr 21 10:54:49 GMT 2001 jkh@narf.osd.bsdi.com:/usr/src/sys/compile/GENERIC i386 > > FreeBSD 4.7-RELEASE FreeBSD 4.7-RELEASE #0: Wed Oct 9 15:08:34 GMT 2002 root@builder.freebsdmall.com:/usr/obj/usr/src/sys/GENERIC i386 Hmm... I just tried this and I didn't see this behavior on 4.7-R: -bash-2.05b$ ln -s a z ln: z: File exists -bash-2.05b$ echo $? 1 -bash-2.05b$ ln -s z a -bash-2.05b$ echo $? 0 -bash-2.05b$ uname -a FreeBSD gate.funkthat.com 4.7-RELEASE FreeBSD 4.7-RELEASE #5: Tue Sep 9 02:05:39 PDT 2003 jmg@gate.funkthat.com:/usr/src/sys/compile/gate i386 Looks like the EEXIST is returning non-zero... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."