From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1G5vY9-0004XY-0T for garchives@archives.gentoo.org; Thu, 27 Jul 2006 02:24:33 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.7/8.13.6) with SMTP id k6R2MKh0002636; Thu, 27 Jul 2006 02:22:20 GMT Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.171]) by robin.gentoo.org (8.13.7/8.13.6) with ESMTP id k6R2KDGu032661 for ; Thu, 27 Jul 2006 02:20:14 GMT Received: by ug-out-1314.google.com with SMTP id s2so38866uge for ; Wed, 26 Jul 2006 19:20:14 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=nrNVlcG2vO2m4zqMzJiLCi9EE1Ekx+OwwYv9B349jyOBTKBwqjy6sL0/BWWdSmg4scrpcpDSMiTA5cj59i/HZlseZ+ET13dJ9R71MFpnb8KVWJl7ItlR/MUHwO0/XbaQI9f8IsI8SLoRpZQfaGNU8e8FiuYgly/myy9VbLpod4U= Received: by 10.66.243.2 with SMTP id q2mr6614443ugh; Wed, 26 Jul 2006 19:20:14 -0700 (PDT) Received: by 10.66.225.2 with HTTP; Wed, 26 Jul 2006 19:20:14 -0700 (PDT) Message-ID: <5ffa2caa0607261920i117829c2x60572cdaa0a4749d@mail.gmail.com> Date: Thu, 27 Jul 2006 10:20:14 +0800 From: "Zhang Le" To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] where does PID wrap around? In-Reply-To: <1153965753.15692.0.camel@orpheus> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_74907_28321319.1153966814012" References: <1153965753.15692.0.camel@orpheus> X-Archives-Salt: 3326401d-8e16-4090-88d9-12c47852a379 X-Archives-Hash: fa312cf6f2ece9ff9fd617e895e1efb9 ------=_Part_74907_28321319.1153966814012 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline On 7/27/06, Iain Buchanan wrote: > > Hi all, > > I know that PID's wrap around if they get to a sufficiently large number > - anyone know what that number is? > > 2^16 (65536), or 2^15 (32768)? $ cat /proc/sys/kernel/pid_max 32768 Is it fixed for a particular system / kernel / universe? or even better, > is there a #define I can use from one of the system headers? > > it is defined in kernel/pid.c int pid_max = PID_MAX_DEFAULT; -- Zhang Le, Robert Linux Engineer/Trainer http://zhllg.spaces.msn.com http://zh.gentoo-wiki.com http://savannah.nongnu.org/projects/pgubook http://groups.google.com/group/gentoo-china http://groups.google.com/group/szlug ------=_Part_74907_28321319.1153966814012 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On 7/27/06, Iain Buchanan <iaindb@netspace.net.au> wrote:
Hi all,

I know that PID's wrap around if they get to a sufficiently large number
- anyone know what that number is?

2^16 (65536), or 2^15 (32768)?
 
$ cat /proc/sys/kernel/pid_max
32768

Is it fixed for a particular system / kernel / universe? or even better,
is there a #define I can use from one of the system headers?

it is defined in kernel/pid.c
int pid_max = PID_MAX_DEFAULT;

--
Zhang Le, Robert
Linux Engineer/Trainer
http://zhllg.spaces.msn.com
http://zh.gentoo-wiki.com
http://savannah.nongnu.org/projects/pgubook
http://groups.google.com/group/gentoo-china
http://groups.google.com/group/szlug ------=_Part_74907_28321319.1153966814012-- -- gentoo-user@gentoo.org mailing list