lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ