Using nested enclaves

An enclave is a logical runtime structure that supports the execution of a collection of routines (see Program management model for a detailed description of Language Environment enclaves).

Language Environment explicitly supports the execution of a single enclave within a Language Environment process. However, by using the system services and language constructs described in this topic, you can create an additional, or nested, enclave and initiate its execution within the same process.

The enclave that issues a call to system services or language constructs to create a nested enclave is called the parent enclave. The nested enclave that is created is called the child enclave. The child must be a main routine; a link to a subroutine by commands and language constructs is not supported under Language Environment.

If a process contains nested enclaves, none or only one enclave can be running with POSIX(ON).