From: Ray Olszewski <ray@comarre.com>
To: linux-newbie@vger.kernel.org
Subject: Re: About PID...???!!!
Date: Wed, 10 Sep 2003 11:56:34 -0700 [thread overview]
Message-ID: <5.1.0.14.1.20030910114823.01f97c68@celine> (raw)
In-Reply-To: <008501c377c5$f92db210$ed64a8c0@descartes>
At 02:04 PM 9/10/2003 -0400, John T. Williams wrote:
>definitely higher then 2^16, I've got a process with the PID of 69917
>I would guess MAX_INT which is 2^32 -1 = 4294967295
Actually, as it turns out, the right answer is "it depends".
Checking my kernel source, I find that the kernel's fork() routine checks
against PID_MAX before wrapping. This value is defined, at least for
2.4.19, in <kernel_source_path>/include/linux/threads.h . My (Debian)
kernel source has there
#define PID_MAX 0x8000
which matches my observed wrapping at (or near) 32768 . You might see if
your kernel source sets this value higher.
>----- Original Message -----
>From: "Ray Olszewski" <ray@comarre.com>
>To: <linux-newbie@vger.kernel.org>
>Sent: Wednesday, September 10, 2003 11:58 AM
>Subject: Re: About PID...???!!!
>
>
> > At 11:21 AM 9/10/2003 -0400, John T. Williams wrote:
> > >They are assigned linearly, however once a pid is used, it is never
>reused
> > >until the machine reboots.
> >
> > This is not quite correct. The pid assignment process wraps, I *think* at
> > 32767 (or maybe 65535). Next time around, the kernel skips over any pids
> > that are still in use from the last round of assignment.
[...]
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
next prev parent reply other threads:[~2003-09-10 18:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-10 14:23 About PID...???!!! Silambu Chelvan
2003-09-10 15:21 ` John T. Williams
2003-09-10 15:58 ` Ray Olszewski
2003-09-10 18:03 ` John T. Williams
2003-09-10 18:04 ` John T. Williams
2003-09-10 18:56 ` Ray Olszewski [this message]
2003-09-10 19:15 ` John T. Williams
2003-09-10 19:17 ` John T. Williams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5.1.0.14.1.20030910114823.01f97c68@celine \
--to=ray@comarre.com \
--cc=linux-newbie@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox