summaryrefslogtreecommitdiffstats
path: root/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
commitbf6355bb3cc93e6db08f51886034f025350ae7f2 (patch)
tree6cd8686ba5f92001b13bc74a467df15bfecdf546 /libutil
parent950f74bfeb6c58dc5e2b1b57980a08f694ba12fc (diff)
downloadpw-darwin-bf6355bb3cc93e6db08f51886034f025350ae7f2.tar.gz
pw-darwin-bf6355bb3cc93e6db08f51886034f025350ae7f2.tar.zst
pw-darwin-bf6355bb3cc93e6db08f51886034f025350ae7f2.zip
Remove a death threat from the FreeBSD sources
Reported by: koobs@, araujo@, linimon@, bjk@, emaste@, jhb@, ngie@, cem@ Maintainer timeout: des@
Diffstat (limited to 'libutil')
-rw-r--r--libutil/flopen.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/libutil/flopen.c b/libutil/flopen.c
index bc4119d..8929729 100644
--- a/libutil/flopen.c
+++ b/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);