git: kernel - Improve pid-reuse algorithm, fix bug

Matthew Dillon dillon at
Mon Apr 21 15:03:36 PDT 2014

commit 3a877e444fff816b8a340d35fe32692d81753695
Author: Matthew Dillon <dillon at>
Date:   Mon Apr 21 15:00:00 2014 -0700

    kernel - Improve pid-reuse algorithm, fix bug
    * Fix a bug where under extreme loads it was possible for a PID to be
      allocated twice.
    * Implement a minimum pid-reuse delay of 10 seconds.  No pid, session id,
      or pgid will be reused for at least 10 seconds after being reaped.
      This shouldn't really be necessary but it should help scripts, particularly
      bulk builds, which rely on testing out-of-band PIDs with pwait.
    * Increase PID_MAX from 99999 to 999999
    Reported-by: marino

Summary of changes:
 sys/kern/kern_proc.c | 101 +++++++++++++++++++++++++++++++++++++++++++++++----
 sys/sys/proc.h       |   8 ++--
 2 files changed, 98 insertions(+), 11 deletions(-)

DragonFly BSD source repository

More information about the Commits mailing list