'Acquire the lock.
Locks the PID file then creates the PID file for this
lock. The `timeout` parameter is used as for the
`LinkFileLock` class.'

def acquire(self, *args, **kwargs):

    super(PIDLockFile, self).acquire(*args, **kwargs)
    try:
        write_pid_to_pidfile(self.path)
    except OSError as exc:
        error = LockFailed(('%(exc)s' % vars()))
        raise error
