lkml.org 
[lkml]   [2007]   [Jun]   [10]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateSun, 10 Jun 2007 06:46:28 +0100
FromAl Viro <>
SubjectRe: [patch 7/8] fdmap v2 - implement sys_socket2
On Sat, Jun 09, 2007 at 10:06:27PM -0700, Linus Torvalds wrote:
> Why the hell doesn't that thing just do an "fstat()" on the thing, and 
> compare the inode number? Not that I would guarantee that it works either 
> for a socket, but it would seem to make more sense than what it apparently 
> does now, and I think it should work at least on Linux.

It works on Linux, all right.

> (Ie linux will give fake "st_ino" numbers to sockets. Whether anybody else 
> will do that, I have no friggin clue. And you probably shouldn't depend on 
> it even under Linux, but damn, despite all of those issues, it's likely 
> better and more logical than what libnss-ldap apparently does now ;)

On FreeBSD it will simply give you zero st_ino on almost all sockets;
AF_UNIX ones get st_ino invented (and stable).  st_dev is NODEV in all
cases...
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-06-10 05:55    [from the cache]
©2003-2008