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. --- man2/mmap.2 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/man2/mmap.2 b/man2/mmap.2 index 3d3d1882f..7ca39ff5d 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 -- 2.19.0.rc0.228.g281dcd1b4d0-goog
From 2390efe297ec8e4f63656a63a2ad118b75cae7a8 Mon Sep 17 00:00:00 2001 From: Elliott Hughes <enh@xxxxxxxxxx> Date: Fri, 24 Aug 2018 10:22:04 -0700 Subject: [PATCH] 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. --- man2/mmap.2 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/man2/mmap.2 b/man2/mmap.2 index 3d3d1882f..7ca39ff5d 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 -- 2.19.0.rc0.228.g281dcd1b4d0-goog