[PATCH] delete fork_tcb()

Dmitry V. Levin ldv at altlinux.org
Tue Jun 21 22:40:17 UTC 2011


On Tue, Jun 21, 2011 at 08:26:07PM +0200, Denys Vlasenko wrote:
> Hi,
> 
> Sometime ago expand_tcbtab/alloc_tcb were modified
> so that they never return failure (they will abort instead).
> 
> This opens up a possibility for further simplifications.
> 
> This patch gets 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 and tcbtabsize
> variables static. (While at it, I nuked redundant extern char **environ
> declaration: strace.c had *two* of them...)
> 
> Please review.

Looks good.


-- 
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20110622/f6fb7c79/attachment.bin>


More information about the Strace-devel mailing list