All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Jackson <ian.jackson@citrix.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: Wei Liu <wl@xen.org>, Paul Durrant <paul@xen.org>,
	Andrew Cooper <Andrew.Cooper3@citrix.com>,
	Jason Andryuk <jandryuk@gmail.com>,
	Elliott Mitchell <ehem+xen@m5p.com>,
	"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Subject: Re: [XEN RFC for-4.14] Re: use of "stat -"
Date: Thu, 25 Jun 2020 15:19:07 +0100	[thread overview]
Message-ID: <24308.45659.314018.214428@mariner.uk.xensource.com> (raw)
In-Reply-To: <7abcae45-6a58-ea7a-be8b-64be50b080a6@suse.com>

Jan Beulich writes ("Re: [XEN RFC for-4.14] Re: use of "stat -""):
> I'm about to test this then, but to be honest I have no idea what
> to do with the comment. I don't think I could properly justify its
> deletion in the description (beyond saying it's not really true),
> nor would I be certain whether to e.g. leave the test -ef part
> there.

You should delete the comment.  You could replace it with its
opposite.  Something like:

 # Although /dev/stdin (ie /proc/self/fd/0) looks like a symlink,
 # stat(2) bypasses the synthetic symlink and directly accesses the
 # underlying open-file.  So this works correctly even if the file
 # has been renamed or unlinked.

> Also is there any reason to go through two symlinks then, rather
> than using /proc/self/fd/$_lockfd directly?

/dev/stdin is clearer, to my mind.

(The tiny performence difference is not relevant here.  It's also
possible that at some point stat(1) might handle it specially.)

Thanks,
Ian.


  parent reply	other threads:[~2020-06-25 14:19 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-12 10:58 use of "stat -" Jan Beulich
2020-05-12 14:19 ` Wei Liu
2020-05-12 14:33   ` Jan Beulich
2020-05-12 14:47     ` Andrew Cooper
2020-05-12 14:59       ` Jan Beulich
2020-05-12 15:52         ` Jason Andryuk
2020-05-12 19:50           ` Elliott Mitchell
2020-05-12 19:54             ` Andrew Cooper
2020-05-12 22:54               ` Elliott Mitchell
2020-05-14 11:02                 ` Ian Jackson
2020-05-14 12:39                   ` Jan Beulich
2020-05-18 10:34                   ` Jan Beulich
2020-06-24 15:55                     ` Ping: " Jan Beulich
2020-06-24 16:19                     ` [XEN RFC for-4.14] " Ian Jackson
2020-06-25  2:37                       ` Jason Andryuk
2020-06-25  7:05                         ` Jan Beulich
2020-06-25 12:04                           ` Jason Andryuk
2020-06-25 13:31                           ` Ian Jackson
2020-06-25 13:48                             ` Jan Beulich
2020-06-25 14:16                               ` Jason Andryuk
2020-06-25  7:27                         ` Rich Persaud
2020-06-25 13:27                         ` Ian Jackson
2020-06-25 14:08                           ` Jan Beulich
2020-06-25 14:18                             ` Jason Andryuk
2020-06-25 14:37                               ` Ian Jackson
2020-06-25 14:19                             ` Ian Jackson [this message]
2020-06-25  7:03                       ` Paul Durrant

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=24308.45659.314018.214428@mariner.uk.xensource.com \
    --to=ian.jackson@citrix.com \
    --cc=Andrew.Cooper3@citrix.com \
    --cc=ehem+xen@m5p.com \
    --cc=jandryuk@gmail.com \
    --cc=jbeulich@suse.com \
    --cc=paul@xen.org \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.