As noted by art, two processes with the same pid would be bad.  Grab the allproclk before searching for a free pid so that we don't sleep between picking one and adding it to the list that is searched. Also, keep holding the lock until after the PIDHASH update.
As noted by art, two processes with the same pid would be bad.  Grab
the allproclk before searching for a free pid so that we don't sleep
between picking one and adding it to the list that is searched.
Also, keep holding the lock until after the PIDHASH update.

ok art@, tedu@

orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars