Defect report from : Jonathan Lennox , Columbia University
(Please direct followup comments direct to yyyyyyyyyyyyyy@xxxxxxxxxxxxx)
@ page 164 line 5795 section 8.3 Other Environment Variables: TZ comment {3}
Problem:
Defect code : 2. Omission
(This is an update for Posix 2001 of part 3 of defect report #135
for 1003.1:1996.)
It is unclear whether it is safe for a multi-threaded program to
change the value of the TZ environment variable within one thread,
while using the functions ctime(), ctime_r(), localtime(),
localtime_r(), strftime(), and mktime() within other threads.
Action:
Add, somewhere, the following text. It's not clear whether this
should accompany the definition of TZ, or the definition of the
relevant functions.
If {_POSIX_THREAD_SAFE_FUNCTIONS} is defined:
The tzset(), ctime(), ctime_r(), localtime(), localtime_r(),
strftime(), and mktime() functions shall be thread-safe with
respect to the interpretation of TZ and the setting of tzname,
if TZ is changed.
In the absence of synchronization information, which value of TZ
applies to any call to ctime(), ctime_r(), localtime(),
localtime_r(), strftime(), and mktime() is undefined.
ctime() and localtime() need not be thread-safe with respect to
their returned data.
|