bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #24949] coreutils pwd not implementing latest POSIX features


From: Paul D. Smith
Subject: [bug #24949] coreutils pwd not implementing latest POSIX features
Date: Wed, 26 Nov 2008 20:50:46 +0000
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.4) Gecko/2008111318 Ubuntu/8.04 (hardy) Firefox/3.0.4

URL:
  <http://savannah.gnu.org/bugs/?24949>

                 Summary: coreutils pwd not implementing latest POSIX
features
                 Project: GNU Core Utilities
            Submitted by: psmith
            Submitted on: Wed 26 Nov 2008 03:50:44 PM EST
                Category: None
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

I've noticed that in the POSIX standard (The Open Group Base Specifications
Issue 6 IEEE Std 1003.1, 2004 Edition), the pwd utility is expected to take
two options:


SYNOPSIS
    pwd [-L | -P ]
        
DESCRIPTION
    The pwd utility shall write to standard output an absolute pathame
    of the current working directory, which does not contain the
    filenames dot or dot-dot.
        
OPTIONS
    The pwd utility shall conform to the Base Definitions volume of
    IEEE Std 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
        
    The following options shall be supported by the implementation:

    -L
        If the PWD environment variable contains an absolute pathname of
        the current directory that does not contain the filenames dot or
        dot-dot, pwd shall write this pathname to standard output.
        Otherwise, the -L option shall behave as the -P option.
    -P
        The absolute pathname written shall not contain filenames that,
        in the context of the pathname, refer to files of type symbolic
        link.

    If both -L and -P are specified, the last one shall apply. If
    neither -L nor -P is specified, the pwd utility shall behave as if
    -L had been specified.


It doesn't appear that the coreutils implementation of pwd supports this.

I realize that most shells including bash have a pwd builtin which is
typically used when the user runs "pwd".  However, pwd is not required to be a
shell builtin by POSIX, and so a strictly conforming sh implementation is not
required to provide it.  It seems to me that coreutils "pwd" should conform.

What do you all think?  I can provide a patch if it would be something you're
interested in.




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?24949>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]