[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20121210211853.19957787m6em7c4k@guarana.org>
Date: Mon, 10 Dec 2012 21:18:53 +1100
From: Kevin Easton <kevin@...rana.org>
To: Tristan Wibberley <tristan.wibberley@...il.com>
Cc: linux-kernel@...r.kernel.org
Subject: Re: New system call wanted: fdreopen
Quoting Tristan Wibberley <tristan.wibberley@...il.com>:
> Why
> ===
>
> 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.
Another alternative is to use pwrite() / pread(), which do not affect the file
pointer. They're in POSIX.
- Kevin
--
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