def METHOD_NAME():
    """Check that a forksafe.RLock is reset after a fork().
    This test fails with a regular threading.RLock.
    """
    lock = forksafe.RLock()
    lock.acquire()
    lock.acquire()
    pid = os.fork()
    if pid == 0:
        # child
        assert lock.acquire()
        lock.release()
        with pytest.raises(RuntimeError):
            lock.release()
        os._exit(12)
    lock.release()
    lock.release()
    with pytest.raises(RuntimeError):
        lock.release()
    _, status = os.waitpid(pid, 0)
    exit_code = os.WEXITSTATUS(status)
    assert exit_code == 12