2003-01-10 Roland McGrath <roland@redhat.com>
* strace.c (droptcb): Clear flags word before calling rebuild_pollv.
This commit is contained in:
parent
7686eee1d7
commit
e29341c02f
25
strace.c
25
strace.c
@ -991,6 +991,18 @@ struct tcb *tcp;
|
||||
nprocs--;
|
||||
tcp->pid = 0;
|
||||
|
||||
if (tcp->parent != NULL) {
|
||||
tcp->parent->nchildren--;
|
||||
#ifdef TCB_CLONE_THREAD
|
||||
if (tcp->flags & TCB_CLONE_DETACHED)
|
||||
tcp->parent->nclone_detached--;
|
||||
if (tcp->flags & TCB_CLONE_THREAD)
|
||||
tcp->parent->nclone_threads--;
|
||||
#endif
|
||||
tcp->parent = NULL;
|
||||
}
|
||||
|
||||
tcp->flags = 0;
|
||||
if (tcp->pfd != -1) {
|
||||
close(tcp->pfd);
|
||||
tcp->pfd = -1;
|
||||
@ -1005,25 +1017,14 @@ struct tcb *tcp;
|
||||
}
|
||||
#endif /* !FREEBSD */
|
||||
#ifdef USE_PROCFS
|
||||
rebuild_pollv();
|
||||
rebuild_pollv(); /* Note, flags needs to be cleared by now. */
|
||||
#endif
|
||||
}
|
||||
if (tcp->parent != NULL) {
|
||||
tcp->parent->nchildren--;
|
||||
#ifdef TCB_CLONE_THREAD
|
||||
if (tcp->flags & TCB_CLONE_DETACHED)
|
||||
tcp->parent->nclone_detached--;
|
||||
if (tcp->flags & TCB_CLONE_THREAD)
|
||||
tcp->parent->nclone_threads--;
|
||||
#endif
|
||||
tcp->parent = NULL;
|
||||
}
|
||||
|
||||
if (outfname && followfork > 1 && tcp->outf)
|
||||
fclose(tcp->outf);
|
||||
|
||||
tcp->outf = 0;
|
||||
tcp->flags = 0;
|
||||
}
|
||||
|
||||
#ifndef USE_PROCFS
|
||||
|
Loading…
Reference in New Issue
Block a user