* process.c (internal_fork): the parent of new cloned process is the
same of the calling process when CLONE_PARENT is set.
---
process.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/process.c b/process.c
index bd8037e..bc89b2d 100644
--- a/process.c
+++ b/process.c
@@ -911,6 +911,16 @@ Process %u resumed (parent %d ready)\n",
tcpchild->flags |= TCB_CLONE_DETACHED;
++tcp->nclone_detached;
}
+ if ((call_flags & CLONE_PARENT) &&
+ !(call_flags & CLONE_THREAD)) {
+ --tcp->nchildren;
+ tcpchild->parent = NULL;
+ if (tcp->parent != NULL) {
+ tcp = tcp->parent;
+ tcpchild->parent = tcp;
+ ++tcp->nchildren;
+ }
+ }
}
#endif /* TCB_CLONE_THREAD */
}
--
1.6.5.2
------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
_______________________________________________
Strace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/strace-devel