lkml.org 
[lkml]   [2001]   [May]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [ot] named sockets
On Mon, 7 May 2001 21:47:33 -0400 (EDT), Adam <adam@cfar.umd.edu> wrote:

>So I'm wondering, is there a way, kind of like "relink" system call which
>coule take existing file descriptor (they are still so the fd is there,
>just unlinked) and link it back to file name?

POSIX' fattach(int fd, const char *path) library call does that,
although it's often limited to STREAMS fd:s. It's usually
implemented as mounting "namefs" at the path (SVR4) or setting
a magic mount option (OSF1), with the fd passed in as mount-point
specific data. Regular users are allowed to do this special mount().

Linux currently doesn't have this functionality, but it could
probably be implemented as a pseudo-fs in 2.4, assuming the 2.4
VFS properly supports stacking of file systems. (There's some
gotchas concerning chown/chmod changes and restoring the original
object after the fd is unmounted.)

Not that I think Linux really needs this creeping featurism ...

/Mikael
-
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: 2005-03-22 12:52    [W:0.140 / U:1.472 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site