summaryrefslogtreecommitdiff
path: root/lib/libutil
diff options
context:
space:
mode:
authorConrad Meyer <cem@FreeBSD.org>2016-12-01 02:21:36 +0000
committerConrad Meyer <cem@FreeBSD.org>2016-12-01 02:21:36 +0000
commit33d19692e83504a53e4e01e8d2805db0e96f0ef5 (patch)
treee3b880014f8f0cea5e14b7f4eac438fc0a4907df /lib/libutil
parent909f007fb8e1ba0d63407c9861bf60ed6d40ceac (diff)
downloadsrc-test2-33d19692e83504a53e4e01e8d2805db0e96f0ef5.tar.gz
src-test2-33d19692e83504a53e4e01e8d2805db0e96f0ef5.zip
Notes
Diffstat (limited to 'lib/libutil')
-rw-r--r--lib/libutil/flopen.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/libutil/flopen.c b/lib/libutil/flopen.c
index bc4119dcb1cc..89297290796e 100644
--- a/lib/libutil/flopen.c
+++ b/lib/libutil/flopen.c
@@ -40,10 +40,10 @@ __FBSDID("$FreeBSD$");
/*
* Reliably open and lock a file.
*
- * DO NOT, UNDER PAIN OF DEATH, modify this code without first reading the
- * revision history and discussing your changes with <des@freebsd.org>.
- * Don't be fooled by the code's apparent simplicity; there would be no
- * need for this function if it was as easy to get right as you think.
+ * Please do not modify this code without first reading the revision history
+ * and discussing your changes with <des@freebsd.org>. Don't be fooled by the
+ * code's apparent simplicity; there would be no need for this function if it
+ * was easy to get right.
*/
int
flopen(const char *path, int flags, ...)
@@ -108,7 +108,11 @@ flopen(const char *path, int flags, ...)
errno = serrno;
return (-1);
}
-#ifdef DONT_EVEN_THINK_ABOUT_IT
+ /*
+ * The following change is provided as a specific example to
+ * avoid.
+ */
+#if 0
if (fcntl(fd, F_SETFD, FD_CLOEXEC) != 0) {
serrno = errno;
(void)close(fd);