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
This commit is contained in:
parent
38af09b891
commit
d165cb4348
@ -28,7 +28,7 @@
|
|||||||
.\" @(#)setmode.3 8.2 (Berkeley) 4/28/95
|
.\" @(#)setmode.3 8.2 (Berkeley) 4/28/95
|
||||||
.\" $FreeBSD$
|
.\" $FreeBSD$
|
||||||
.\"
|
.\"
|
||||||
.Dd February 22, 2015
|
.Dd July 18, 2019
|
||||||
.Dt SETMODE 3
|
.Dt SETMODE 3
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
@ -125,3 +125,10 @@ and
|
|||||||
.Fn setmode
|
.Fn setmode
|
||||||
functions first appeared in
|
functions first appeared in
|
||||||
.Bx 4.4 .
|
.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.
|
||||||
|
Loading…
Reference in New Issue
Block a user