From owner-freebsd-standards@FreeBSD.ORG Wed Sep 12 17:08:17 2012 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0DF671065673 for ; Wed, 12 Sep 2012 17:08:17 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id CE7028FC19 for ; Wed, 12 Sep 2012 17:08:16 +0000 (UTC) Received: by pbbrp2 with SMTP id rp2so2833755pbb.13 for ; Wed, 12 Sep 2012 10:08:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=Yu7hFKAues6tri96eH3MfhcHgE+yjmwrIM7BGLItAz4=; b=rNmg4NNliz41vKdQrn2t3sfq32g+FEB9pqXSAQjiFi75UgI3tErPihCGsY5kXy28+Z 64ZJO1m1Ooo2m70yeviH788Zl6kAHM8u+pvIZ6nQfGQ36U5vTJJqelN/V5q7kjzHh/jU T6u8YRYFCI80ulXKTT6FIc/VJDfnQJJX9ONn4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:x-gm-message-state; bh=Yu7hFKAues6tri96eH3MfhcHgE+yjmwrIM7BGLItAz4=; b=UUF0ZYTFPPsU0geJbKaVcPFYM5v0LfXb1aKqln52W5Dz8C0PsnBh2lgnw0LtYtERzb 7ndKN45zyh9lCI7r2icvs/r/5oYhAbSo+OvKHtQq+XK3r07wZjK9MOO1+UbaS3io11q9 ni2hdGygsSVF7LXoKZHFC8b7BWrUmmFL+U+j80MpKHPVt9sYHeLMr9QAKwbLZ9zIcG97 jXg1TFCCRrhU4NKs5k7NDflXGm0k0XRonFvvSK+b+HWx5wTX9VQqzwJuB/fth6LUCxre dzqodQydSHTXsz62he7WL9ahzcdo89G61SUs1aKTbmALbyqra6ytfz2qd0x7gbySJH5m ymIg== Received: by 10.68.213.195 with SMTP id nu3mr17433037pbc.81.1347469696120; Wed, 12 Sep 2012 10:08:16 -0700 (PDT) MIME-Version: 1.0 Received: by 10.66.87.41 with HTTP; Wed, 12 Sep 2012 10:07:44 -0700 (PDT) In-Reply-To: <201209121700.q8CH0DFn038845@freefall.freebsd.org> References: <201209121700.q8CH0DFn038845@freefall.freebsd.org> From: Eitan Adler Date: Wed, 12 Sep 2012 13:07:44 -0400 Message-ID: To: Andrey Chernov Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQkAixb0pO/omeZ4JmL9GxGCc2smPvNvZAOoivRq+1ajDw9FK/cgaqGE8cSD6PoG+2vkh6lh Cc: FreeBSD Standards , bug-followup@freebsd.org Subject: Re: standards/171577: realpath(3) returns ENOTDIR instead of ENOENT X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Sep 2012 17:08:17 -0000 On 12 September 2012 13:00, Andrey Chernov wrote: > The following reply was made to PR standards/171577; it has been noted by GNATS. > > From: Andrey Chernov > To: Ed Maste > Cc: FreeBSD-gnats-submit@FreeBSD.ORG > Subject: Re: standards/171577: realpath(3) returns ENOTDIR instead of ENOENT > Date: Wed, 12 Sep 2012 20:56:07 +0400 > > On Wed, Sep 12, 2012 at 03:54:43PM +0000, Ed Maste wrote: > > When passed a path with a component that does not exist realpath() sets > > errno to ENOTDIR instead of ENOENT. See kern/128933 for the change that > > introduced this behaviour. I believe it is incorrect. > > > > ENOTDIR is > > > > 20 ENOTDIR Not a directory. A component of the specified pathname > > existed, but it was not a directory, when a directory was > > expected. > > > > >How-To-Repeat: > > > > feynman% realpath /does-not-exist/foo > > realpath: /does-not-exist/foo: Not a directory > > It works as designed. See POSIX realpath ERRORS section > http://pubs.opengroup.org/onlinepubs/9699919799/functions/realpath.html ENOTDIR implies the path exists: [ENOTDIR] Not a directory. A component of the specified pathname exists, but it is not a directory, when a directory was expected. from section 2.3: Error Numbers http://pubs.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_03.html -- Eitan Adler