aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2018-08-26 13:14:33 +0200
committerMichael Kerrisk <mtk.manpages@gmail.com>2018-08-26 13:14:33 +0200
commit3ee0a7f07ed1bd607e598bc4477af0dea5db4084 (patch)
treefff44a3b97cfd8fdeb5d7d2a3eebc9c51112c624
parentdc9b6c92852bca1541ed13d730b8653d2b8a806d (diff)
downloadman-pages-3ee0a7f07ed1bd607e598bc4477af0dea5db4084.tar.gz
mmap.2: Explicitly state that the fd can be closed
I regularly see excessive fd usage bugs (or even leaks) caused by people who think they need to keep the fd open as long as the mapping exists. Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
-rw-r--r--man2/mmap.22
1 files changed, 2 insertions, 0 deletions
diff --git a/man2/mmap.2 b/man2/mmap.2
index 3d3d1882f9..7ca39ff5d6 100644
--- a/man2/mmap.2
+++ b/man2/mmap.2
@@ -87,6 +87,8 @@ in the file (or other object) referred to by the file descriptor
.I offset
must be a multiple of the page size as returned by
.IR sysconf(_SC_PAGE_SIZE) .
+The file descriptor can be closed immediately without invalidating the
+mapping.
.PP
The
.I prot