tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: how to tell if a process is 64-bit

On Fri, Sep 08, 2017 at 12:55:37PM +0200, Thomas Klausner wrote:
> What's the best answer for NetBSD?

If the kernel is 64bit:
kvm_getproc2() and check the process flags for P_32.

If not: all of them ;-}

I would find it more interesting to answer "what is the emulation it runs
under", so you have, say: netbsd native x86_64 processes, netbsd_compat32 
i386 processes, 32 bit linux, 64 bit linux, .... (but I don't know an
easy answer for that).


Home | Main Index | Thread Index | Old Index