This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] [BZ #15392] Remove fork child pid assertion
- From: Ricky Zhou <rickyz at chromium dot org>
- To: libc-alpha at sourceware dot org
- Cc: Ricky Zhou <rickyz at chromium dot org>
- Date: Fri, 14 Nov 2014 17:29:15 -0800
- Subject: [PATCH] [BZ #15392] Remove fork child pid assertion
- Authentication-results: sourceware.org; auth=none
This assertion is no longer always true, since a forked child may be in
a different PID namespace than its parent, and the two namespace may
have PID collisions.
An example program which hits this assert is attached to bug 17596.
[BZ #15392]
* sysdeps/nptl/fork.c (__libc_fork): Remove assert that the parent
and child pid must differ after forking.
---
sysdeps/nptl/fork.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/sysdeps/nptl/fork.c b/sysdeps/nptl/fork.c
index a7dafa8..6adb723 100644
--- a/sysdeps/nptl/fork.c
+++ b/sysdeps/nptl/fork.c
@@ -139,8 +139,6 @@ __libc_fork (void)
{
struct pthread *self = THREAD_SELF;
- assert (THREAD_GETMEM (self, tid) != ppid);
-
/* See __pthread_once. */
if (__fork_generation_pointer != NULL)
*__fork_generation_pointer += __PTHREAD_ONCE_FORK_GEN_INCR;
--
2.1.0.rc2.206.gedb03e5