Subject: Re: Inheritance of P_CLDSIGIGN
To: Quentin Garnier <cube@cubidou.net>
From: Bill Studenmund <wrstuden@netbsd.org>
List: tech-kern
Date: 05/17/2005 11:16:33
--ibTvN161/egqYuK8
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, May 17, 2005 at 12:00:47PM +0200, Quentin Garnier wrote:
> Hi,
>=20
> While trying to understand the behaviour of a Linux program under
> emulation on NetBSD, I discovered the fact that we don't inherit the
> P_CLDSIGIGN flag for processes.

=2E..

> Comments?

=2E..

> Index: kern_fork.c
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> RCS file: /pub/NetBSD-CVS/src/sys/kern/kern_fork.c,v
> retrieving revision 1.121
> diff -u -r1.121 kern_fork.c
> --- kern_fork.c	2 Mar 2005 11:05:34 -0000	1.121
> +++ kern_fork.c	17 May 2005 09:52:35 -0000
> @@ -294,7 +294,7 @@
>  	 * The p_stats and p_sigacts substructs are set in uvm_fork().
>  	 * Inherit SUGID, STOPFORK and STOPEXEC flags.

Please update the comment too.

>  	 */
> -	p2->p_flag =3D p1->p_flag & (P_SUGID | P_STOPFORK | P_STOPEXEC);
> +	p2->p_flag =3D p1->p_flag & (P_SUGID | P_STOPFORK | P_STOPEXEC | P_CLDS=
IGIGN);
>  	p2->p_emul =3D p1->p_emul;
>  	p2->p_execsw =3D p1->p_execsw;

Take care,

Bill


--ibTvN161/egqYuK8
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (NetBSD)

iD8DBQFCijUBWz+3JHUci9cRArGgAJ9UEXW083FD2fvNvI8I0ouNLFizRQCffPRY
Nwp+OL3854xlj4FKmaMZSz8=
=8RJC
-----END PGP SIGNATURE-----

--ibTvN161/egqYuK8--