(internal_clone): Fix a few typos and add definitions to make it at

least compile.
This commit is contained in:
Ulrich Drepper 1999-12-24 07:22:25 +00:00
parent 0fa01d706f
commit 90512f0332

View File

@ -359,6 +359,9 @@ int
internal_clone(tcp) internal_clone(tcp)
struct tcb *tcp; struct tcb *tcp;
{ {
struct tcb *tcpchild;
int pid;
int dont_follow = 0;
if (entering(tcp)) { if (entering(tcp)) {
tprintf("fn=%#lx, child_stack=%#lx, flags=", tprintf("fn=%#lx, child_stack=%#lx, flags=",
tcp->u_arg[0], tcp->u_arg[1]); tcp->u_arg[0], tcp->u_arg[1]);
@ -379,7 +382,7 @@ struct tcb *tcp;
tcp->flags |= TCB_FOLLOWFORK; tcp->flags |= TCB_FOLLOWFORK;
/* XXX /* XXX
/* We will take the simple approach and add CLONE_PTRACE to the clone * We will take the simple approach and add CLONE_PTRACE to the clone
* options. This only works on Linux 2.2.x and later. This means that * options. This only works on Linux 2.2.x and later. This means that
* we break all programs using clone on older kernels.. * we break all programs using clone on older kernels..
* We should try to fallback to the bpt-trick if this fails, but right * We should try to fallback to the bpt-trick if this fails, but right
@ -404,8 +407,8 @@ struct tcb *tcp;
/* For fork we need to re-attach, but thanks to CLONE_PTRACE we're /* For fork we need to re-attach, but thanks to CLONE_PTRACE we're
* already attached. * already attached.
*/ */
tcphild->flags |= TCB_ATTACHED; tcpchild->flags |= TCB_ATTACHED;
newoutf(tcpfhild); newoutf(tcpchild);
tcp->nchildren++; tcp->nchildren++;
if (!qflag) if (!qflag)
fprintf(stderr, "Process %d attached\n", pid); fprintf(stderr, "Process %d attached\n", pid);