Bug 103701
Summary: | timegm() manpage suggests a terrible workaround | ||
---|---|---|---|
Product: | Documentation | Reporter: | Stephen Hurd (shurd) |
Component: | man-pages | Assignee: | documentation_man-pages (documentation_man-pages) |
Status: | RESOLVED CODE_FIX | ||
Severity: | low | CC: | mats, mtk.manpages |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | Subsystem: | ||
Regression: | No | Bisected commit-id: |
Description
Stephen Hurd
2015-08-29 10:36:07 UTC
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 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? 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. Okay--you two convinced me. I killed the sample timegm() implementation and added mention of UTC. Thread-safety issues are covered already in ATTRIBUTES. |