]> granicus.if.org Git - strace/commit
Delete fork_tcb()
authorDenys Vlasenko <dvlasenk@redhat.com>
Wed, 22 Jun 2011 10:45:25 +0000 (12:45 +0200)
committerDenys Vlasenko <dvlasenk@redhat.com>
Wed, 22 Jun 2011 10:45:25 +0000 (12:45 +0200)
commit2b60c35b33cf22a88405c60db1e620880d05a7d4
treeaa59eec5a8ce7ff33cac934c55c5f742663dca6f
parent18da27367534217ac52a425413ae3f8b4b9d8ad2
Delete fork_tcb()

Get rid of fork_tcb() function. It used to do what the comment
above it says, but now it doesn't do much:
it only sets tcp->flags |= TCB_FOLLOWFORK and maybe calls
expand_tcbtab(). The second operation is not necessary, since
alloc_tcp() will do it itself when needed.
This patch deletes fork_tcb(), open-coding tcp->flags |= TCB_FOLLOWFORK
where it was formerly called. It also makes nprocs, tcbtabsize and
expand_tcbtab() static. (While at it, I nuked redundant
extern char **environ declaration: strace.c had *two* of them...)

* defs.h: Remove declarations of nprocs, tcbtabsize and
  expand_tcbtab.
* process.c (fork_tcb): Remove this function.
  (internal_fork): Open-code fork_tcb.
  (handle_new_child): Likewise.
* strace.c: Remove redundant "extern char **environ". Declare
  nprocs and tcbtabsize static.
  (expand_tcbtab): Make it static.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
defs.h
process.c
strace.c