Manual Reference Pages - DUPLOCALE (3)
- duplicate an locale
duplocale locale_t locale
Duplicates an existing
returning a new
that refers to the same locale values but has an independent internal state.
Various functions, such as
require a persistent state.
These functions formerly used static variables and calls to them from multiple
threads had undefined behavior.
They now use fields in the
associated with the current thread by
These calls are therefore only thread safe on threads with a unique per-thread
The locale returned by this call must be freed with
This function conforms to
should make a copy of the
implicitly to ensure thread safety,
and a copy of the global locale should be installed lazily on each thread.
The FreeBSD implementation does not do this,
for compatibility with Darwin.
Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.