Michael Kerrisk (man-pages | 27 Jul 13:57 2014
Picon

Re: Man pages 3.70, system(3)

On 07/25/2014 02:50 PM, Damir Nedzibovic wrote:
> Hello,
> 
> in the "DESCRIPTION" paragraph, it says:
> 
> execl("/bin/sh", "sh". "-c", command, (char *) 0);
> 
> I find the second parameter a bit funny ("sh". "-c") - shouldn't that read just "-c"?

Hello Damir,

Thanks for the report. That "," should be a ".". I've applied a fix.

Cheers,

Michael

--

-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo@...
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Michael Kerrisk (man-pages | 22 Jul 07:40 2014
Picon

Re: Possible Manpage bug for bind(2)

Ryan,

On 07/17/2014 07:39 PM, Ryan Hammonds wrote:
> Greetings,
> I'd like to point out an issue in the manpage for bind(2). My
> application is trying to bind an IPV4 UDP socket to an address. I've
> found that passing an invalid address length to bind() causes bind to
> return EINVAL. According to the bind(2) manpage, this should only
> occur when using unix domain sockets (which I am not). 

Yes, your report looks right to me. I applied the patch below.
Thanks for the report.

> This also
> makes me wonder if the current description (EINVAL = "the socket is
> already bound to an address") is correct in the first place.

A bit of light testing suggests that it is (still) correct.

Cheers,

Michael

--- a/man2/bind.2
+++ b/man2/bind.2
 <at>  <at>  -183,6 +183,12  <at>  <at>  The socket is already bound to an address.
 .\" This may change in the future: see
 .\" .I linux/unix/sock.c for details.
 .TP
+.B EINVAL
(Continue reading)

Peng Haitao | 28 Jul 09:53 2014

[PATCH] strlen.3: Reformat thread-safety information

Signed-off-by: Peng Haitao <penght@...>
---
 man3/strlen.3 | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/man3/strlen.3 b/man3/strlen.3
index 13ad631..162762e 100644
--- a/man3/strlen.3
+++ b/man3/strlen.3
 <at>  <at>  -48,10 +48,17  <at>  <at>  The
 function returns the number of bytes in the string
 .IR s .
 .SH ATTRIBUTES
-.SS Multithreading (see pthreads(7))
-The
+For an explanation of the terms used in this section, see
+.BR attributes (7).
+.TS
+allbox;
+lb lb lb
+l l l.
+Interface	Attribute	Value
+T{
 .BR strlen ()
-function is thread-safe.
+T}	Thread safety	MT-Safe
+.TE
 .SH CONFORMING TO
 SVr4, 4.3BSD, C89, C99.
 .SH SEE ALSO
(Continue reading)

Peng Haitao | 28 Jul 09:51 2014

[PATCH] strnlen.3: Reformat thread-safety information

Signed-off-by: Peng Haitao <penght@...>
---
 man3/strnlen.3 | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/man3/strnlen.3 b/man3/strnlen.3
index b994743..5731596 100644
--- a/man3/strnlen.3
+++ b/man3/strnlen.3
 <at>  <at>  -69,10 +69,17  <at>  <at>  if there is no null byte (\(aq\\0\(aq) among the first
 bytes pointed to by
 .IR s .
 .SH ATTRIBUTES
-.SS Multithreading (see pthreads(7))
-The
+For an explanation of the terms used in this section, see
+.BR attributes (7).
+.TS
+allbox;
+lb lb lb
+l l l.
+Interface	Attribute	Value
+T{
 .BR strnlen ()
-function is thread-safe.
+T}	Thread safety	MT-Safe
+.TE
 .SH CONFORMING TO
 POSIX.1-2008.
 .SH SEE ALSO
(Continue reading)

Peng Haitao | 28 Jul 09:46 2014

[PATCH] strpbrk.3: Reformat thread-safety information

Signed-off-by: Peng Haitao <penght@...>
---
 man3/strpbrk.3 | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/man3/strpbrk.3 b/man3/strpbrk.3
index 0ae1c3a..32beb55 100644
--- a/man3/strpbrk.3
+++ b/man3/strpbrk.3
 <at>  <at>  -54,10 +54,17  <at>  <at>  that matches one of the bytes in
 or NULL
 if no such byte is found.
 .SH ATTRIBUTES
-.SS Multithreading (see pthreads(7))
-The
+For an explanation of the terms used in this section, see
+.BR attributes (7).
+.TS
+allbox;
+lb lb lb
+l l l.
+Interface	Attribute	Value
+T{
 .BR strpbrk ()
-function is thread-safe.
+T}	Thread safety	MT-Safe
+.TE
 .SH CONFORMING TO
 SVr4, 4.3BSD, C89, C99.
 .SH SEE ALSO
(Continue reading)

Peng Haitao | 28 Jul 09:43 2014

[PATCH] strsep.3: Reformat thread-safety information

Signed-off-by: Peng Haitao <penght@...>
---
 man3/strsep.3 | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/man3/strsep.3 b/man3/strsep.3
index f469ebf..c65bb0a 100644
--- a/man3/strsep.3
+++ b/man3/strsep.3
 <at>  <at>  -77,10 +77,17  <at>  <at>  function returns a pointer to the token,
 that is, it returns the original value of
 .IR *stringp .
 .SH ATTRIBUTES
-.SS Multithreading (see pthreads(7))
-The
+For an explanation of the terms used in this section, see
+.BR attributes (7).
+.TS
+allbox;
+lb lb lb
+l l l.
+Interface	Attribute	Value
+T{
 .BR strsep ()
-function is thread-safe.
+T}	Thread safety	MT-Safe
+.TE
 .SH CONFORMING TO
 4.4BSD.
 .SH NOTES
(Continue reading)

Peng Haitao | 28 Jul 09:35 2014

[PATCH] strverscmp.3: ATTRIBUTES: Note function that is thread-safe

The function strverscmp() is thread safe.

Signed-off-by: Peng Haitao <penght@...>
---
 man3/strverscmp.3 | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/man3/strverscmp.3 b/man3/strverscmp.3
index bba46e5..241065d 100644
--- a/man3/strverscmp.3
+++ b/man3/strverscmp.3
 <at>  <at>  -87,6 +87,18  <at>  <at>  less than, equal to, or greater than zero if
 is found, respectively, to be earlier than, equal to,
 or later than
 .IR s2 .
+.SH ATTRIBUTES
+For an explanation of the terms used in this section, see
+.BR attributes (7).
+.TS
+allbox;
+lb lb lb
+l l l.
+Interface	Attribute	Value
+T{
+.BR strverscmp ()
+T}	Thread safety	MT-Safe
+.TE
 .SH CONFORMING TO
 This function is a GNU extension.
 .SH SEE ALSO
(Continue reading)

Peng Haitao | 28 Jul 09:22 2014

[PATCH] strspn.3: Reformat thread-safety information

Signed-off-by: Peng Haitao <penght@...>
---
 man3/strspn.3 | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/man3/strspn.3 b/man3/strspn.3
index f05b8a2..d435dfa 100644
--- a/man3/strspn.3
+++ b/man3/strspn.3
 <at>  <at>  -72,12 +72,18  <at>  <at>  the initial segment of
 which are not in the string
 .IR reject .
 .SH ATTRIBUTES
-.SS Multithreading (see pthreads(7))
-The
-.BR strspn ()
-and
+For an explanation of the terms used in this section, see
+.BR attributes (7).
+.TS
+allbox;
+lbw19 lb lb
+l l l.
+Interface	Attribute	Value
+T{
+.BR strspn (),
 .BR strcspn ()
-functions are thread-safe.
+T}	Thread safety	MT-Safe
+.TE
(Continue reading)

Peng Haitao | 28 Jul 09:18 2014

[PATCH] strstr.3: Reformat thread-safety information

Signed-off-by: Peng Haitao <penght@...>
---
 man3/strstr.3 | 21 ++++++++++++---------
 1 file changed, 12 insertions(+), 9 deletions(-)

diff --git a/man3/strstr.3 b/man3/strstr.3
index e8f82d8..babb562 100644
--- a/man3/strstr.3
+++ b/man3/strstr.3
 <at>  <at>  -63,17 +63,20  <at>  <at>  but ignores the case of both arguments.
 These functions return a pointer to the beginning of the
 located substring, or NULL if the substring is not found.
 .SH ATTRIBUTES
-.SS Multithreading (see pthreads(7))
-The
+For an explanation of the terms used in this section, see
+.BR attributes (7).
+.TS
+allbox;
+lb lb lb
+l l l.
+Interface	Attribute	Value
+T{
 .BR strstr ()
-function is thread-safe.
-.LP
-The
+T}	Thread safety	MT-Safe
+T{
 .BR strcasestr ()
(Continue reading)

Peng Haitao | 28 Jul 09:13 2014

[PATCH] strtod.3: Reformat thread-safety information

Signed-off-by: Peng Haitao <penght@...>
---
 man3/strtod.3 | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/man3/strtod.3 b/man3/strtod.3
index 1b82a0a..4216e17 100644
--- a/man3/strtod.3
+++ b/man3/strtod.3
 <at>  <at>  -158,17 +158,19  <at>  <at>  is stored in
 .B ERANGE
 Overflow or underflow occurred.
 .SH ATTRIBUTES
-.SS Multithreading (see pthreads(7))
-The
+For an explanation of the terms used in this section, see
+.BR attributes (7).
+.TS
+allbox;
+lbw29 lb lb
+l l l.
+Interface	Attribute	Value
+T{
 .BR strtod (),
 .BR strtof (),
-and
 .BR strtold ()
-functions are thread-safe with exceptions.
-These functions can be safely used in multithreaded applications,
-as long as
(Continue reading)

Peng Haitao | 28 Jul 08:35 2014

[PATCH] inet.3: ATTRIBUTES: Note functions that are thread safe with exceptions

The functions inet_aton() and inet_addr() are thread safe with
exceptions.
The functions inet_network(), inet_ntoa(), inet_makeaddr(),
inet_lnaof() and inet_netof() are thread safe.

Signed-off-by: Peng Haitao <penght@...>
---
 man3/inet.3 | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/man3/inet.3 b/man3/inet.3
index bf2cd28..6e4663c 100644
--- a/man3/inet.3
+++ b/man3/inet.3
 <at>  <at>  -215,6 +215,28  <at>  <at>  struct in_addr {
 };
 .fi
 .in
+.SH ATTRIBUTES
+For an explanation of the terms used in this section, see
+.BR attributes (7).
+.TS
+allbox;
+lbw30 lb lb
+l l l.
+Interface	Attribute	Value
+T{
+.BR inet_aton (),
+.BR inet_addr ()
+T}	Thread safety	MT-Safe locale
(Continue reading)


Gmane