* [PATCH] getdate.3: Add description of the function is not thread-safe
@ 2011-09-06 9:23 Peng Haitao
[not found] ` <4E65E6A9.6080005-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Peng Haitao @ 2011-09-06 9:23 UTC (permalink / raw)
To: Michael Kerrisk; +Cc: linux-man-u79uwXL29TY76Z2rM5mHXA
The function getdate() uses a static variable "tmbuf", so it is not thread-safe.
Signed-off-by: Peng Haitao <penght-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
---
man3/getdate.3 | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/man3/getdate.3 b/man3/getdate.3
index 7f30f9c..038a49c 100644
--- a/man3/getdate.3
+++ b/man3/getdate.3
@@ -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
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 2+ messages in thread[parent not found: <4E65E6A9.6080005-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>]
* Re: [PATCH] getdate.3: Add description of the function is not thread-safe [not found] ` <4E65E6A9.6080005-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> @ 2013-03-17 10:51 ` Michael Kerrisk (man-pages) 0 siblings, 0 replies; 2+ messages in thread From: Michael Kerrisk (man-pages) @ 2013-03-17 10:51 UTC (permalink / raw) To: Peng Haitao; +Cc: linux-man-u79uwXL29TY76Z2rM5mHXA On Tue, Sep 6, 2011 at 11:23 AM, Peng Haitao <penght-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> wrote: > > The function getdate() uses a static variable "tmbuf", so it is not thread-safe. Applied. thanks, Michael > Signed-off-by: Peng Haitao <penght-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> > --- > man3/getdate.3 | 11 ++++++++++- > 1 files changed, 10 insertions(+), 1 deletions(-) > > diff --git a/man3/getdate.3 b/man3/getdate.3 > index 7f30f9c..038a49c 100644 > --- a/man3/getdate.3 > +++ b/man3/getdate.3 > @@ -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 > -- 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 majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-03-17 10:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-06 9:23 [PATCH] getdate.3: Add description of the function is not thread-safe Peng Haitao
[not found] ` <4E65E6A9.6080005-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2013-03-17 10:51 ` Michael Kerrisk (man-pages)
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox