This should probably be expressed in terms of a random PID instead, with runtime checking to ensure the PID isn't in use before attempting to claim in.