        /* Get the file descriptor we can use to wait for the job
         * to be ready to be woken up
         */
        printf(&quot;Waiting for the job to be woken up\n&quot;);

        if (!ASYNC_WAIT_CTX_get_all_fds(ctx, NULL, &amp;numfds)
                || numfds &gt; 1) {
            printf(&quot;Unexpected number of fds\n&quot;);
            abort();
        }
        ASYNC_WAIT_CTX_get_all_fds(ctx, &amp;waitfd, &amp;numfds);
        FD_ZERO(&amp;waitfdset);
        FD_SET(waitfd, &amp;waitfdset)