Eric Blake wrote:
> > -But the replacement function is not atomic in multi-threaded programs.
> > +But the replacement function is not atomic; this matters in multi-threaded
> > +programs that spawn child processes.
>
> I like it.
Thanks for the review. I've pushed it.
Bruno
On 01/26/2012 12:26 PM, Eric Wong wrote:
> I can't think of a safe way to implement
> SOCK_CLOEXEC/SOCK_NONBLOCK/O_CLOEXEC as-is in gnulib and have it be
> forward-compatible. If we expose the flags in public headers, the OS
> authors can eventually add support for these things and the native OS
>
Eric Blake wrote:
> 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-of
On 01/26/2012 10:07 AM, Bruno Haible wrote:
> Eric Blake wrote:
>> Thread one calls pipe2(O_CLOEXEC), but gets the gnulib version, which
>> first calls pipe(), then we context switch.
>> Thread two calls fork(), and in the child, calls exec()
>
> Right, this is why pipe2 should better be atomic.
>
Eric Blake wrote:
> Thread one calls pipe2(O_CLOEXEC), but gets the gnulib version, which
> first calls pipe(), then we context switch.
> Thread two calls fork(), and in the child, calls exec()
Right, this is why pipe2 should better be atomic.
But this goes beyond of what is normally understood b
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
> ---
> I took th
On 01/26/2012 07:28 AM, Bruno Haible wrote:
> 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
>
> Can you please des
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
Can you please describe a situation with multiple threads where gnulib's
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
---
I took the line off the existing documentation for the
similar-in-p