New: timegm() manpage suggests a terrible workaround
https://bugzilla.kernel.org/show_bug.cgi?id=103701
Bug ID: 103701
Summary: timegm() manpage suggests a terrible workaround
Product: Documentation
Version: unspecified
Hardware: All
OS: Linux
Status: NEW
Severity: low
Priority: P1
Component: man-pages
Assignee: documentation_man-pages-ztI5WcYan/[email protected]
Reporter: [email protected]
Regression: No
In today's multi-threaded world, is changing an environment variable, calling tzset(), calling mktime(), changing the env variable back, and calling tzset() again really the best way to solve this problem?
Signature · 6 lines
You are receiving this mail because: You are watching the assignee of the bug. -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): bug-103701-11311-3bo0kxnWaOQUvHkbgXJLS5sdmw4N0Rt+2LY78lusg7I@public.gmane.org/
[Bug 103701] timegm() manpage suggests a terrible workaround
https://bugzilla.kernel.org/show_bug.cgi?id=103701
Michael Kerrisk <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]
--- Comment #1 from Michael Kerrisk <[email protected]> --- Stephen,
It's obviously not ideal. I added some words pointing out that it's not thread-safe. But, I have no further idea for changes. Do you?
Cheers,
Michael
Signature · 6 lines
You are receiving this mail because: You are watching the assignee of the bug. -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
[Bug 103701] timegm() manpage suggests a terrible workaround
In reply to a message not in the archivehttps://bugzilla.kernel.org/show_bug.cgi?id=103701
--- Comment #2 from Stephen Hurd <[email protected]> --- I'm not sure why the manpage documents how to not use the function (obviously, documenting *why* not to use it makes sense.)
If there's honestly no good way to emulate timegm() in a threadsafe manner, should its use really be discouraged?
Signature · 6 lines
You are receiving this mail because: You are watching the assignee of the bug. -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
[Bug 103701] timegm() manpage suggests a terrible workaround
In reply to a message not in the archivehttps://bugzilla.kernel.org/show_bug.cgi?id=103701
Mats Wichmann <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]
--- Comment #3 from Mats Wichmann <[email protected]> --- The Gnu glibc documentation has something like this in the portability notes. Often the genesis of comments when there's a strange disclaimer in the manpage :)
I guess I'd suggest the page emphasize the UTC aspect and mention the threadsafe issue, and stop there - not try to document a workaround.
Signature · 6 lines
You are receiving this mail because: You are watching the assignee of the bug. -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
[Bug 103701] timegm() manpage suggests a terrible workaround
In reply to a message not in the archivehttps://bugzilla.kernel.org/show_bug.cgi?id=103701
Michael Kerrisk <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |CODE_FIX--- Comment #4 from Michael Kerrisk <[email protected]> --- Okay--you two convinced me. I killed the sample timegm() implementation and added mention of UTC. Thread-safety issues are covered already in ATTRIBUTES.
Signature · 6 lines
You are receiving this mail because: You are watching the assignee of the bug. -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html