On 14/01/2024 16:07, Christian Franke wrote:
Recently I learned about the existence and usefulness of close_range():
https://github.com/smartmontools/smartmontools/issues/235

https://man.freebsd.org/cgi/man.cgi?query=close_range&sektion=2
https://man7.org/linux/man-pages/man2/close_range.2.html

Note that the above Linux man page is not fully correct. The include file "linux/close_range.h" exists, but provides only the defines. It is sufficient to include "unistd.h" as on FreeBSD.

The attached patch adds this to Cygwin. It does not implement the Linux-specific CLOSE_RANGE_UNSHARE as I have no idea how to do this :-)

This API should also be mentioned in the
"System interfaces compatible with GNU or Linux extensions" section of doc/posix.xml

Reply via email to