From owner-freebsd-hackers@FreeBSD.ORG Sun Jun 4 18:48:56 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 11E5B16A567 for ; Sun, 4 Jun 2006 18:48:56 +0000 (UTC) (envelope-from artifact.one@googlemail.com) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.182]) by mx1.FreeBSD.org (Postfix) with ESMTP id A128043D45 for ; Sun, 4 Jun 2006 18:48:55 +0000 (GMT) (envelope-from artifact.one@googlemail.com) Received: by py-out-1112.google.com with SMTP id m51so1183880pye for ; Sun, 04 Jun 2006 11:48:52 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=googlemail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=hWC0apRUO5w64OPWVE0JeZ1Z63RyOlw+T3Uqor5i1sN0iALaDG+sj4CI5rh9Rg2cnfCjhJzbtC13DVSSm+vsgcKheL9rg2fZv6xK00adlaZOla5X3D27QRP5gnwNuyFxAiyUb/S5H8KTWrqxVbBFAObjzpvwcnjXk/0/0qIGucQ= Received: by 10.35.131.10 with SMTP id i10mr5193858pyn; Sun, 04 Jun 2006 11:48:52 -0700 (PDT) Received: by 10.35.121.7 with HTTP; Sun, 4 Jun 2006 11:48:52 -0700 (PDT) Message-ID: <8e96a0b90606041148g5674ca31r74be2e1f9c79b640@mail.gmail.com> Date: Sun, 4 Jun 2006 19:48:52 +0100 From: "mal content" To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: Strange behaviour from mkdir()? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jun 2006 18:48:56 -0000 Is this expected behaviour (I'm using the mkdir utility for the example, but the problem occurs using the system call directly): # mkdir . mkdir: .: File exists # mkdir .. mkdir: ..: File exists Now, the unusual one: # mkdir / mkdir: /: Is a directory Shouldn't it say 'file exists'? The mkdir() man page doesn't say that the function can set errno to EISDIR and yet that's what's happening here. FreeBSD 6.0-RELEASE-p7 MC