Subject: Re: selecting processes with a given emul?
To: Emmanuel Dreyfus <manu@netbsd.org>
From: Alfred Perlstein <bright@mu.org>
List: tech-kern
Date: 06/02/2002 14:29:14
* Emmanuel Dreyfus <manu@netbsd.org> [020602 14:03] wrote:
> Hi all
>
> How should I find the processes running a given emulation? Comparing
> p->p_emul to the address of the emul structure is not LKM friendly, is
> there another solution?
>
> I need this because I have to walk the process list and use some
> p->p_emuldata. Not checking the process' emulation before accessing
> p->p_emuldata is likely to cause a crash.
p->p_emul has lots of info for you to examine to make sure you have
the right type of binary. You should be able to examine that and
then safely dereference p_emuldata.
--
-Alfred Perlstein [alfred@freebsd.org]
'Instead of asking why a piece of software is using "1970s technology,"
start asking why software is ignoring 30 years of accumulated wisdom.'
Tax deductible donations for FreeBSD: http://www.freebsdfoundation.org/