-
Caio Marcelo de Oliveira Filho authored
Since Linux 3.11, O_TMPFILE flag can be used in open syscall to create an unnamed file in a directory. The file occupies space in the filesystem, and can be given a name using linkat syscall. If the file is closed without being given a name, its contents are deleted. See the manpage open(2) in Linux for details. Exports O_TMPFILE for Linux in 386 and amd64 (other architectures already had it). Exports Linkat syscall and AT_SYMLINK_FOLLOW (used for giving a name to the file) for all Linux in all architectures. Fixes golang/go#7830. Change-Id: Ib82e44f405b227e227b9cbf317c2657b32e046f5 Reviewed-on: https://go-review.googlesource.com/21003Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
23999e87