LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Alexey Dobriyan <adobriyan@gmail.com>
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
viro@zeniv.linux.org.uk
Subject: Re: [PATCH] proc: restore seekdir("/proc", 256) semantics
Date: Wed, 2 May 2018 21:10:06 +0200 [thread overview]
Message-ID: <20180502191006.a4sizopciou2bfm5@devuan> (raw)
In-Reply-To: <20180423215009.GE9043@avx2>
Hi!
> Long time ago "/proc/self" was an honest symlink and all not-PID entries
> were output before /proc/$PID. To not lose /proc/self in readdir output
> after it became permanently positive dentry it was stuck before /proc/1.
>
> One side effect of the change was that the code
>
> d = opendir("/proc");
> seekdir(d, 256);
>
> stopped pointing to the first PID for applications that want to skip all
> the crap.
>
> Later "/proc/thread-self" was added in the same way.
>
> It looks like ps and top aren't seeking over /proc but are simply
> skipping over so nobody noticed.
>
> Restore old behaviour, make seekdir(254) point to /proc/self and
> seekdir(255) point to /proc/thread-self.
Is there anyone relying on the old behaviour?
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
prev parent reply other threads:[~2018-05-02 19:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-23 21:50 Alexey Dobriyan
2018-05-01 22:23 ` Andrew Morton
2018-05-03 17:13 ` Alexey Dobriyan
2018-05-02 19:10 ` Pavel Machek [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=20180502191006.a4sizopciou2bfm5@devuan \
--to=pavel@ucw.cz \
--cc=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
--subject='Re: [PATCH] proc: restore seekdir("/proc", 256) semantics' \
/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
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).