Next: process parent child, Up: process [Contents][Index]
The following API allows us to run a test function in a subprocess. Example:
static cctests_child_process_function_t child_function;
void
test_1_1 (cce_destination_t upper_L)
{
cctests_call_in_forked_process(upper_L, child_function);
}
void
child_function (cce_destination_t L)
/* This is run in a subprocess. */
{
cctests_assert(L, true);
}
Type of function to call in a subprocess.
Fork a process:
_exit(). The child function might terminate the subprocess by itself.
Next: process parent child, Up: process [Contents][Index]
This document describes version 0.4.1-devel.1 of CCTests.