[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BANLkTi=dQRi82gkDwtR3Kh2R7f0uGu7HpQ@mail.gmail.com>
Date: Wed, 29 Jun 2011 09:22:35 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Ulrich Drepper <drepper@...adia.org>
Cc: akpm@...ux-foundation.org, kosaki.motohiro@...fujitsu.com,
linux-kernel@...r.kernel.org, rientjes@...gle.com,
viro@...iv.linux.org.uk, wilsons@...rt.ca
Subject: Re: [PATCH] Add cloexec information to fdinfo
On Wed, Jun 29, 2011 at 1:15 AM, Ulrich Drepper <drepper@...adia.org> wrote:
>
> In this specific case I was trying to re-implement the pfiles program.
> For normal file descriptors (not sockets) this was the last piece of
> information which wasn't available. This is all part of my "give
> Solaris users no reason to not switch" effort. I intend to offer the
> code to the util-linux-ng maintainers.
Ok.
So the part I really dislike about the patch is how it makes O_CLOEXEC
so magically different from the other O_xyz flags.
Wouldn't it be much nicer to just show it in the "flags:" line?
Also, I don't think you need the rcu locking, since we hold the
files->file_lock here anyway.
>> Also, it's by no means the only thing not visible in /proc. Things
>> like file locking status, leases, file descriptor ownership, signal
>> number associated with the setown etc.
>
> True, and maybe that will be useful as well.
>
> I might actually have some more patches to get to socket information but
> I haven't fully checked out yet what is available.
So at least O_CLOEXEC seems to have a real reason, and fits the
existing model. I think a patch like the attached would be ok. Does
that work for you? It's entirely untested here.
Linus
View attachment "patch.diff" of type "text/x-patch" (960 bytes)
Powered by blists - more mailing lists