File Descriptor Environment
3-4
The parent task functions would look something like the following:
Parent Task Functions:
void create_child_task()
{
// Create System Tasks
// Create a child task
hChildTask = TaskCreate( &child_socket_task,
…
);
}
void destroy_child_task()
{
// First close the child’s file session
// (This will close all open files)
fdSessionClose( hChildTask );
// Then destroy the task
TaskDestroy( hChildTask );
}