linux-man.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com>
To: Jakub Wilk <jwilk@jwilk.net>
Cc: mtk.manpages@gmail.com, linux-man@vger.kernel.org
Subject: Re: [PATCH] proc.5: use "pwd -P" for printing cwd
Date: Mon, 20 Jul 2020 11:36:40 +0200	[thread overview]
Message-ID: <7617b408-a6e6-672b-4bd7-9a2c51738500@gmail.com> (raw)
In-Reply-To: <20200720061200.5449-1-jwilk@jwilk.net>

Hello Jakub,

On 7/20/20 8:12 AM, Jakub Wilk wrote:
> "/bin/pwd" happens to work with the GNU coreutils implementation, which
> has -P as the default, contrary to POSIX requirements.
> 
> Use "pwd -P" instead, which is shorter, easier to type, and should work
> everywhere.

Nice catch! Thanks. Patch applied.

Cheers,

Michael

> Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
> ---
>  man5/proc.5 | 11 +----------
>  1 file changed, 1 insertion(+), 10 deletions(-)
> 
> diff --git a/man5/proc.5 b/man5/proc.5
> index 0dbc05228..55f425dcd 100644
> --- a/man5/proc.5
> +++ b/man5/proc.5
> @@ -588,19 +588,10 @@ for instance, you can do this:
>  .IP
>  .in +4n
>  .EX
> -.RB "$" " cd /proc/20/cwd; /bin/pwd"
> +.RB "$" " cd /proc/20/cwd; pwd \-P"
>  .EE
>  .in
>  .IP
> -Note that the
> -.I pwd
> -command is often a shell built-in, and might
> -not work properly.
> -In
> -.BR bash (1),
> -you may use
> -.IR "pwd\ \-P" .
> -.IP
>  .\" The following was still true as at kernel 2.6.13
>  In a multithreaded process, the contents of this symbolic link
>  are not available if the main thread has already terminated
> 


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/

      reply	other threads:[~2020-07-20  9:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-20  6:12 [PATCH] proc.5: use "pwd -P" for printing cwd Jakub Wilk
2020-07-20  9:36 ` Michael Kerrisk (man-pages) [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7617b408-a6e6-672b-4bd7-9a2c51738500@gmail.com \
    --to=mtk.manpages@gmail.com \
    --cc=jwilk@jwilk.net \
    --cc=linux-man@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).