On 13 Jun, Attilio Rao wrote:
> 2012/6/13, Svatopluk Kraus <onw...@gmail.com>:
>> Hi,
>>
>>  it looks similar to
>> http://lists.freebsd.org/pipermail/freebsd-current/2011-March/023829.html
> 
> Yes, that is likely the problem.
> However, I would really love to workaround the pid allocation race in
> another way than PRS_NEW because this imposes an extra-constraint,
> undocumented, on iterations of processes in the system.
> If you want to work on a patch for that, you are welcome to do so.

A long time ago I had a patch that moved pid allocation and insertion
into allproc to a later point in fork1() where the child had been fully
initialized.  It had two minor disadvantages.  The first is that
allproc_lock needed to be acquired and released twice.  The second is
that nprocs and the number of processes in allproc temporarily become
inconsistent while the fork is in progress.

Eventually the patch conflicts got too bad and I dropped the patch from
my local tree.

_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

Reply via email to