From owner-freebsd-questions Fri Oct 8 16:15:22 1999 Delivered-To: freebsd-questions@freebsd.org Received: from scientia.demon.co.uk (scientia.demon.co.uk [212.228.14.13]) by hub.freebsd.org (Postfix) with ESMTP id 963791500C for ; Fri, 8 Oct 1999 16:15:04 -0700 (PDT) (envelope-from ben@scientia.demon.co.uk) Received: from strontium.scientia.demon.co.uk ([192.168.0.4] ident=exim) by scientia.demon.co.uk with esmtp (Exim 3.032 #1) id 11Zglr-0002CA-00; Fri, 08 Oct 1999 21:37:43 +0100 Received: (from ben) by strontium.scientia.demon.co.uk (Exim 3.032 #1) id 11Zglq-0000Jb-00; Fri, 08 Oct 1999 21:37:42 +0100 Date: Fri, 8 Oct 1999 21:37:42 +0100 From: Ben Smithurst To: Joe Pepin Cc: FBSDQuestion Subject: Re: Where (in the source) do PIDs get set? Message-ID: <19991008213742.A423@strontium.scientia.demon.co.uk> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.6i In-Reply-To: Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Joe Pepin wrote: > I'd like to start poking around in the source to start learning > what's up. My first question is- where do I look to find the piece > of code that sets a processes' PID? I've grepped and grepped, but > with no real luck. I'm interested in seeing how hard it would be > to randomize those like in OpenBSD. Look around line 251 of /sys/kern/kern_fork.c. If you have a different version, it may vary, look for occurences of "nextpid" and you shouldn't be far away. -- Ben Smithurst | PGP: 0x99392F7D ben@scientia.demon.co.uk | key available from keyservers and | ben+pgp@scientia.demon.co.uk To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message