Adding pid lock.