*BSD News Article 72433


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!nntp.coast.net!howland.reston.ans.net!Germany.EU.net!news.dfn.de!news.ruhr-uni-bochum.de!news.rwth-aachen.de!newsserver.rrzn.uni-hannover.de!aix11.hrz.uni-oldenburg.de!uniol!uni-erlangen.de!news.tu-chemnitz.de!irz401!orion.sax.de!uriah.heep!news
From: j@uriah.heep.sax.de (J Wunsch)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: kvm_getprocs and ttys
Date: 29 Jun 1996 17:06:01 GMT
Organization: Private BSD site, Dresden
Lines: 24
Message-ID: <4r3npp$s7j@uriah.heep.sax.de>
References: <4qutf1$2a0@multivac.orthanc.com>
Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch)
NNTP-Posting-Host: localhost.heep.sax.de
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Newsreader: knews 0.9.6
X-Phone: +49-351-2012 669
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F  93 21 E0 7D F9 12 D6 4E

lyndon@orthanc.com (Lyndon Nerenberg) wrote:

> When calling kvm_getprocs with op=KERN_PROC_TTY, what the heck are
> you supposed to pass in arg?

UTSL.  Or: all documentation files usually end up in .c. ;-)

	       case KERN_PROC_TTY:
		       if ((p->p_flag & P_CONTROLT) == 0 ||
			   p->p_session == NULL ||
			   p->p_session->s_ttyp == NULL ||
			   p->p_session->s_ttyp->t_dev != (dev_t)name[0])
			       continue;
		       break;

This is from /sys/kern/kern_proc.c which is called via sysctl().
Obviously, you are supposed to supply an arg of type dev_t.

-- 
cheers, J"org

joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)