bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] pipe2: document lack of thread-safety in replacement


From: Eric Blake
Subject: Re: [PATCH] pipe2: document lack of thread-safety in replacement
Date: Thu, 26 Jan 2012 08:33:03 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111222 Thunderbird/9.0

On 01/25/2012 06:09 PM, Eric Wong wrote:
> As the replacement cannot be made thread-safe, we need to
> document this to prevent users from having a false sense
> of safety.
> 
> * doc/glibc-functions/pipe2.texi (pipe2): mention lack of thread-safety
> 
> Signed-off-by: Eric Wong <address@hidden>
> ---
>  I took the line off the existing documentation for the
>  similar-in-purpose *at() functions.

We need the same for accept4() and other places where we have non-atomic
replacements for FD_CLOEXEC (and someday, I need to get around to
implementing open(O_CLOEXEC), which would also be non-atomic).

I'm pushing this instead.

From 41423a6ca6273e751ca6fd2376641f57b8e40ff8 Mon Sep 17 00:00:00 2001
From: Eric Blake <address@hidden>
Date: Thu, 26 Jan 2012 08:31:48 -0700
Subject: [PATCH] pipe2, assign4: document lack of thread-safety in
 replacement

* doc/glibc-functions/pipe2.texi (pipe2): Mention thread safety
issue in replacement.
* doc/glibc-functions/accept4.texi (accept4): Likewise.
Based on a report by Eric Wong.
---
 ChangeLog                        |    8 ++++++++
 doc/glibc-functions/accept4.texi |    1 +
 doc/glibc-functions/pipe2.texi   |    1 +
 3 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 2aa1e83..a1c8a29 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2012-01-26  Eric Blake  <address@hidden>
+
+       pipe2: document lack of thread-safety in replacement
+       * doc/glibc-functions/pipe2.texi (pipe2): Mention thread safety
+       issue in replacement.
+       * doc/glibc-functions/accept4.texi (accept4): Likewise.
+       Based on a report by Eric Wong.
+
 2012-01-24  Marc-André Lureau  <address@hidden>  (tiny change)
            Bruno Haible  <address@hidden>

diff --git a/doc/glibc-functions/accept4.texi
b/doc/glibc-functions/accept4.texi
index f21d62b..cd0486c 100644
--- a/doc/glibc-functions/accept4.texi
+++ b/doc/glibc-functions/accept4.texi
@@ -10,6 +10,7 @@ accept4
 This function is missing on many non-glibc platforms:
 MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX
5.1, HP-UX 11,
 IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.7.1, mingw, MSVC 9,
Interix 3.5, BeOS.
+But the replacement function is not atomic in multi-threaded programs.
 @end itemize

 Portability problems not fixed by Gnulib:
diff --git a/doc/glibc-functions/pipe2.texi b/doc/glibc-functions/pipe2.texi
index 2fef538..e632d3d 100644
--- a/doc/glibc-functions/pipe2.texi
+++ b/doc/glibc-functions/pipe2.texi
@@ -10,6 +10,7 @@ pipe2
 This function is missing on many non-glibc platforms:
 MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX
5.1, HP-UX 11,
 IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.7.1, mingw, MSVC 9,
Interix 3.5, BeOS.
+But the replacement function is not atomic in multi-threaded programs.
 @end itemize

 Portability problems not fixed by Gnulib:
-- 
1.7.7.6

-- 
Eric Blake   address@hidden    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]