Skip to contentSkip to conversation

getdate.3: Add description of the function is not thread-safe

PATCH Applied Peng Haitao 2 participants 2 messages Sep 6, 2011 – Mar 17, 2013 1 message not in the archive Man-pages: manual pages for Linux -- Sections 2, 3, 4, 5, and 7

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 getdate.3: Add description of the function is not thread-safe

The function getdate() uses a static variable "tmbuf", so it is not thread-safe.

---
 man3/getdate.3 |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)
man3/getdate.3 +10 -1
index 7f30f9c..038a49c 100644
@@ -25,7 +25,7 @@
 .\" Modified, 2001-12-26, aeb
 .\" 2008-09-07, mtk, Various rewrites; added an example program.
 .\"
-.TH GETDATE 3 2010-09-20 "" "Linux Programmer's Manual"
+.TH GETDATE 3 2011-09-06 "" "Linux Programmer's Manual"
 .SH NAME
 getdate, getdate_r \- convert a date-plus-time string to broken-down time
 .SH SYNOPSIS
@@ -190,6 +190,15 @@ File containing format patterns.
 .BR TZ ", " LC_TIME
 Variables used by
 .BR strptime (3).
+.SH ATTRIBUTES
+.SS Multithreading (see pthreads(7))
+The
+.BR getdate ()
+function is not thread-safe.
+.LP
+The
+.BR getdate_r ()
+function is thread-safe.
 .SH "CONFORMING TO"
 POSIX.1-2001.
 .SH NOTES
Signature · 10 lines
1.7.1

-- 
Best Regards,
Peng Haitao

--
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): [email protected]

#2 lore raw
Quoted 2 lines · Peng Haitao

The function getdate() uses a static variable "tmbuf", so it is not thread-safe.

Applied.

thanks,

Michael

Quoted 41 lines
---
 man3/getdate.3 |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)
man3/getdate.3 +10 -2
index 7f30f9c..038a49c 100644
@@ -25,7 +25,7 @@
 .\" Modified, 2001-12-26, aeb
 .\" 2008-09-07, mtk, Various rewrites; added an example program.
 .\"
-.TH GETDATE 3 2010-09-20 "" "Linux Programmer's Manual"
+.TH GETDATE 3 2011-09-06 "" "Linux Programmer's Manual"
 .SH NAME
 getdate, getdate_r \- convert a date-plus-time string to broken-down time
 .SH SYNOPSIS
@@ -190,6 +190,15 @@ File containing format patterns.
 .BR TZ ", " LC_TIME
 Variables used by
 .BR strptime (3).
+.SH ATTRIBUTES
+.SS Multithreading (see pthreads(7))
+The
+.BR getdate ()
+function is not thread-safe.
+.LP
+The
+.BR getdate_r ()
+function is thread-safe.
 .SH "CONFORMING TO"
 POSIX.1-2001.
 .SH NOTES
--

1.7.1

--
Best Regards,
Peng Haitao

Signature · 7 lines
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Author of "The Linux Programming Interface"; http://man7.org/tlpi/
--
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