lkml.org 
[lkml]   [2000]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: PID Wrap <strangeness>
Date
Richard B. Johnson wrote:
> On Linux 2.3.41 (haven't checked others) when the PID wraps past
> 32,767 the next PID is 300. It is not the next-available low one.

Look at linux-2.3.41/kernel/fork.c:get_pid():

if((++last_pid) & 0xffff8000) {
last_pid = 300; /* Skip daemons etc. */
goto inside;
}

The only reason that comes into my mind is that you want to have
your daemons (more exactly: procs started at system startup) to show
up in the first lines of a ps output sorted by PID...

Thomas.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:56    [W:0.034 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site