Subject: Re: multiple copies of wait4()
To: None <tech-kern@netbsd.org>
From: Christos Zoulas <christos@zoulas.com>
List: tech-kern
Date: 10/24/2002 16:16:33
In article <20021024160346.B736@snowdrop.l8s.co.uk>,
David Laight <david@l8s.co.uk> wrote:
>The source tree contains what are (effectively) 5 different
>copies of the code for wait4().  This routine contains the
>non-trivial code to free up a process.
>Not all the copies actually match properly because changes 
>have not been applied to all of them.
>
>The code is in:
>sys_wait4() (kern/kern_exit.c)
>irix_sys_waitsys (compat/irix/irix_signal.c)
>netbsd32_wait4 (compat/netbsd32/netbsd32_wait.c)
>svr4_sys_waitsys (compat/svr4/svr4_misc.c)
>svr4_32_sys_waitsys (compat/svr4_32/svr4_32_misc.c)
>
>Although these compat options (probably) aren't that common
>the cost of commoning the code is minimal.
>
>Replacing sys_wait4() with the following code allows the
>emulations to avoid knowing the internals of process allocation.
>
>(The code for the emulations is now similar to sys_wait4, but
>not given here to save bandwidth.)

That looks good to me. Why don't you send me a complete patch?

christos