diff options
author | Justus Winter <4winter@informatik.uni-hamburg.de> | 2013-09-16 12:20:25 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2013-09-21 16:01:15 +0200 |
commit | 6c277e6e677df4b92f7588513f34f745af5fce24 (patch) | |
tree | ad036355f9f3f5440358f4f686c18eac32edfa5b /proc | |
parent | fc186a1d87ff6c58db228740cc9b04da164c7af1 (diff) |
proc: do not hand out PID 0
Using PID 0 causes various problems. This makes genpid skip PID 0.
* proc/mgt.c (genpid): Start PIDs at 1.
Diffstat (limited to 'proc')
-rw-r--r-- | proc/mgt.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -862,7 +862,7 @@ genpid () { #define WRAP_AROUND 30000 #define START_OVER 100 - static int nextpid = 0; + static int nextpid = 1; static int wrap = WRAP_AROUND; while (nextpid < wrap && !pidfree (nextpid)) |