View Issue Details

IDProjectCategoryView StatusLast Update
00008801003.1(2013)/Issue7+TC1System Interfacespublic2019-06-10 08:54
Reportergeoffclare Assigned To 
PrioritynormalSeverityObjectionTypeOmission
Status ClosedResolutionAccepted 
NameGeoff Clare
OrganizationThe Open Group
User Reference
Sectiontzset
Page Number2162
Line Number68881
Interp StatusApproved
Final Accepted Text0000880:0002432
Summary0000880: tzset() thread safety and access to the globals it sets
DescriptionThe standard requires tzset() to be thread safe, despite the fact that it sets the global variables tzname, timezone and daylight. This is necessary since mktime() and strftime() are thread safe and behave as if they call tzset(). An implementation can easily achieve this by serialising access to the globals in its library functions. However, the standard says nothing about direct access to the globals from one thread while another thread is in a call to tzset() (or mktime() or strftime()).
Desired ActionOn page 2162 line 68888 section tzset()

In the DESCRIPTION section, add a new paragraph to the end of the section:

If a thread accesses tzname, [XSI]daylight, or timezone[/XSI] directly while another thread is in a call to tzset(), or to any function that is required or allowed to set timezone information as if by calling tzset(), the behavior is undefined.

On page 2162 line 68903 section tzset()

In the APPLICATION USAGE section, change from:

None.

to:

Since the ctime(), localtime(), mktime(), strftime() and strftime_l() functions are required to set timezone information as if by calling tzset(), there is no need for an explicit tzset() call before using these functions. However, portable applications should call tzset() explicitly before using ctime_r() or localtime_r() because setting timezone information is optional for those functions.
Tagstc2-2008

Activities

msbrown

2014-11-06 17:31

manager   bugnote:0002432

Last edited: 2014-11-06 17:33

Interpretation response
------------------------

The standard does not speak to this issue, and as such no conformance distinction can be made between alternative implementations based on this. This is being referred to the sponsor.

Rationale:
-------------
None.

Notes to the Editor (not part of this interpretation):
-------------------------------------------------------
Use the actions requested in the Desired Actions section.

ajosey

2014-11-27 10:33

manager   bugnote:0002450

Interpretation Proposed: 27 November 2014

ajosey

2015-01-05 14:12

manager   bugnote:0002513

Interpretation approved: 5 Jan 2015

Issue History

Date Modified Username Field Change
2014-10-03 15:16 geoffclare New Issue
2014-10-03 15:16 geoffclare Name => Geoff Clare
2014-10-03 15:16 geoffclare Organization => The Open Group
2014-10-03 15:16 geoffclare Section => tzset
2014-10-03 15:16 geoffclare Page Number => 2162
2014-10-03 15:16 geoffclare Line Number => 68881
2014-10-03 15:16 geoffclare Interp Status => ---
2014-11-06 17:31 msbrown Note Added: 0002432
2014-11-06 17:32 msbrown Note Edited: 0002432
2014-11-06 17:33 msbrown Note Edited: 0002432
2014-11-06 17:34 msbrown Interp Status --- => Proposed
2014-11-06 17:34 msbrown Final Accepted Text => 0000880:0002432
2014-11-06 17:34 msbrown Status New => Interpretation Required
2014-11-06 17:34 msbrown Resolution Open => Accepted
2014-11-06 17:35 msbrown Tag Attached: tc2-2008
2014-11-06 17:35 geoffclare Interp Status Proposed => Pending
2014-11-27 10:33 ajosey Interp Status Pending => Proposed
2014-11-27 10:33 ajosey Note Added: 0002450
2015-01-05 14:12 ajosey Interp Status Proposed => Approved
2015-01-05 14:12 ajosey Note Added: 0002513
2019-06-10 08:54 agadmin Status Interpretation Required => Closed