[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20121209193733.GA15378@hiwaay.net>
Date: Sun, 9 Dec 2012 13:37:33 -0600
From: Chris Adams <cmadams@...aay.net>
To: linux-kernel@...r.kernel.org
Subject: Re: New system call wanted: fdreopen
Once upon a time, Tristan Wibberley <tristan.wibberley@...il.com> said:
>A common idiom on Linux is to open a file and keep the fd open so that
>the underlying file can be unlinked from its directory. But if the file
>needs to be read from several different parts of the codebase then due to
>the file descriptor having exactly one read pointer those different parts
>must be synchronised which is a relatively difficult task.
I think you can get similar behavior entirely in user space and in a
fashion portable to at least BSD systems. You could fork() (which would
create a separate FD in the child), pass the FD back to the parent over
a socket, and then have the child exit.
--
Chris Adams <cmadams@...aay.net>
Systems and Network Administrator - HiWAAY Internet Services
I don't speak for anybody but myself - that's enough trouble.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists