svn commit: r350330 - stable/11/lib/libc/gen
Brooks Davis
brooks at FreeBSD.org
Thu Jul 25 18:15:44 UTC 2019
Author: brooks
Date: Thu Jul 25 18:15:43 2019
New Revision: 350330
URL: https://svnweb.freebsd.org/changeset/base/350330
Log:
MFC r350116:
Document that setmode(3) is not thread safe.
In some circumstances, setmode(3) may call umask(2) twice to retrieve
the current mode and then restore it. Between calls, the process will
have a umask of 0.
Reviewed by: markj
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D20982
Modified:
stable/11/lib/libc/gen/setmode.3
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/lib/libc/gen/setmode.3
==============================================================================
--- stable/11/lib/libc/gen/setmode.3 Thu Jul 25 17:33:44 2019 (r350329)
+++ stable/11/lib/libc/gen/setmode.3 Thu Jul 25 18:15:43 2019 (r350330)
@@ -28,7 +28,7 @@
.\" @(#)setmode.3 8.2 (Berkeley) 4/28/95
.\" $FreeBSD$
.\"
-.Dd February 22, 2015
+.Dd July 18, 2019
.Dt SETMODE 3
.Os
.Sh NAME
@@ -125,3 +125,10 @@ and
.Fn setmode
functions first appeared in
.Bx 4.4 .
+.Sh BUGS
+The
+.Fn setmode
+function is not thread safe.
+Files created in other threads while
+.Fn setmode
+is being called may be created with a umask of 0.
More information about the svn-src-all
mailing list