Re: PID Wrap <strangeness>

From: Guest section DW (dwguest@win.tue.nl)
Date: Wed Feb 23 2000 - 06:15:34 EST


On Wed, Feb 23, 2000 at 01:29:36AM -0800, H. Peter Anvin 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.
> > >
> > > Does anybody know why?

> > This behaviour was introduced in 2.1.37.
> > There is no very good reason. But it separates processes that
> > were started early (init, syslogd, atd, inetd, lpd, cron, etc.)
> > from the usual processes. That may be useful

> Huh? "ps" is capable of sorting by starting time, which is a much
> better idea than relying on the pids behaving *any* particular way.

Of course.
But clearly the author of this patch thought it useful
to introduce this behaviour. And it certainly does not harm.

[What does harm a little bit however, is the fact that we wrap.
For security reasons I would much prefer a 31-bit pid.
However, Linus did not apply my (trivial) patch, not sure precisely why,
perhaps just 2.4 freeze. It is a good time now, now that ipc problems
have been cleared up.]

-
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/



This archive was generated by hypermail 2b29 : Wed Feb 23 2000 - 21:00:32 EST