This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH roland/getpid] Simplify getpid handling of the race case.
- From: Rich Felker <dalias at libc dot org>
- To: Roland McGrath <roland at hack dot frob dot com>
- Cc: "GNU C. Library" <libc-alpha at sourceware dot org>
- Date: Fri, 9 May 2014 20:12:49 -0400
- Subject: Re: [PATCH roland/getpid] Simplify getpid handling of the race case.
- Authentication-results: sourceware.org; auth=none
- References: <20140509222324 dot 795042C3A01 at topped-with-meat dot com>
On Fri, May 09, 2014 at 03:23:24PM -0700, Roland McGrath wrote:
> In looking at consolidating the NPTL vs not versions of vfork, I came
> across the single, bizarre difference between the libpthread and libc
> versions of vfork. This is implemented by a few lines of assembly for each
> machine, and nowhere is there a comment that explains the rationale.
>
> The code in question is fiddling with the pid field of 'struct pthread'.
I think there are several open race-condition bugs that amount to the
pid caching glibc does being invalid in certain corner cases. Would
you review them as part of looking at this issue?
Rich