Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Feb 2004 14:29:23 -0500 (EST)
From:      Daniel Eischen <eischen@vigrid.com>
To:        Julian Elischer <julian@elischer.org>
Cc:        freebsd-threads@freebsd.org
Subject:   Re: Should ps -p list threads?
Message-ID:  <Pine.GSO.4.10.10402121418450.5277-100000@pcnet5.pcnet.com>
In-Reply-To: <Pine.BSF.4.21.0402121102570.10555-100000@InterJet.elischer.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 12 Feb 2004, Julian Elischer wrote:
> 
> The origianlpatch had _H show threads and normal ps did not..
> I don't know why this is as it is...

Because it didn't take into account other 'ps' options.  Enabling
or disabling thread info should be an option for all KERN_PROC_foo,
not a separate option.  If I were to change it, I would add

	#define	KERN_PROC_THREADS	0x10000

to <sys/sysctl.h>.  Then allow:

	mib[0] = CTL_KERN;
	mib[1] = KERN_PROC;
	mib[2] = KERN_PROC_UID | KERN_PROC_THREADS;
	mib[3] = pid;

...

-- 
Dan Eischen



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.10.10402121418450.5277-100000>