'Remove the lock if the process isn\'t running.
I.e. process does not respons to signal.'

def remove_if_stale(self):

    try:
        pid = self.read_pid()
    except ValueError as exc:
        print(u'Broken    pidfile    found    -    Removing    it.', file=sys.stderr)
        self.remove()
        return True
    if (not pid):
        self.remove()
        return True
    try:
        os.kill(pid, 0)
    except os.error as exc:
        if (exc.errno == errno.ESRCH):
            print(u'Stale    pidfile    exists    -    Removing    it.', file=sys.stderr)
            self.remove()
            return True
    return False
