;

        /* Wait for the job to be ready for wakeup */
        select(waitfd + 1, &amp;waitfdset, NULL, NULL, NULL);
    }

end:
    ASYNC_WAIT_CTX_free(ctx);
    printf(&quot;Finishing\n&quot;);

    return 0;
}</code></pre>

<p>The expected output from executing the above example program is:</p>

<pre><code>Starting...
Executing within a job
Passed in message is: Hello world!
Job was paused
Waiting for the job to be woken up
Resumed the job after a pause
Job finished with return value 1
Finishing</code>