Avaya Logo

Previous Topic

Next Topic

Book Contents

Book Index

Exec versus Subprog

In summary, for a transient child process both irExec and irSubProg perform a fork(2) and exec(2).

In the case of irExec, channel ownership goes from the parent process to the child process. When the child process relinquishes channel ownership the default owner then owns the channel.

In the case of irSubProg, channel ownership goes from the parent process to the child process. When the child process relinquishes channel ownership the parent process resumes ownership of the channel and may continue to use the channel_id associated with the channel. The child process returns ownership to the parent via irReturn.

For a permanent child process neither irExec nor irSubProg perform a fork(2) and exec(2) as the permanent child process is already running. The permanent child process was started via /etc/inittab or similar mechanism.

Channel ownership behavior as described above with transient child processes is the same with permanent child processes. TAS scripts may irExec or irSubProg IRAPI applications via the exec or subprog script instructions. IRAPI applications may irExec or irSubProg TAS scripts via the irExec or irSubProg functions. The irExecService or irSubProgService functions are especially useful here.

The tunable parameter called NCONTEXTSTACK defines the maximum number of irSubProg'ed processes available to a single IRAPI application. The default value of this parameter is 3; the minimum value is 1 and the maximum value is 10. If more than NCONTEXTSTACK processes are irSubProg'ed, then the return from irSubProg is -1 and the value of irError is set to IRER_SYSERROR and irSysError is set to ENOMEM.

© 2006 Avaya Inc. All Rights Reserved.