* process.c (internal_fork): The parent of new cloned process is the
same of the calling process when CLONE_PARENT is set.
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 */
}