Run check_cgroup_availability() in a separate thread to detect the following problem:
    If "cgexec --sticky" is used to tell cgrulesengd to not interfere
    with our child processes, the sticky flag unfortunately works only
    for processes spawned by the main thread, not those spawned by other threads
    (and this will happen if "benchexec -N" is used).

def check_cgroup_availability_in_thread(options):
    """
    Run check_cgroup_availability() in a separate thread to detect the following problem:
    If "cgexec --sticky" is used to tell cgrulesengd to not interfere
    with our child processes, the sticky flag unfortunately works only
    for processes spawned by the main thread, not those spawned by other threads
    (and this will happen if "benchexec -N" is used).
    """
    thread = _CheckCgroupsThread(options)
    thread.start()
    thread.join()
    if thread.error:
        raise thread.error