[lkml]   [2019]   [Apr]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v2 0/5] pid: add pidfd_open()
On Mon, Apr 1, 2019 at 8:55 AM Daniel Colascione <> wrote:
> > I wonder if we really want a fill procfs2, or maybe we could just make
> > the pidfd readable (yes, it's a directory file descriptor, but we
> > could allow reading).
> What would read(2) read?

We could make it read anything, but it would have to be something
people agree is sufficient (and not so expensive to create that rare
users of that data would find the overhead excessive).

Eg we could make it return the same thing that /proc/<pid>/status
reads right now.

But it sounds like you need pretty much all of /proc/<pid>/xyz:

> We do a lot of process state inspection and manipulation, including
> reading and writing the oom killer adjustment score, reading smaps,
> and the occasional cgroup manipulation. More generally, I'd also like
> to be able to write a race-free pkill(1)

I suspect most of what pkill wants is indeed in that 'status' file,
but other things aren't.


 \ /
  Last update: 2019-04-01 18:09    [W:0.668 / U:7.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site