Spawn API provides more POSIX-like process model

The iSeries uses a call/return mechanism when your application calls programs. A new process is not started when you call a program, instead the program runs and returns to its caller. You can use activation groups to separate or partition the program resources from the caller.

For the more POSIX-like behavior of running each program in a separate process (and thus taking advantage of thread safety, encapsulation, and protection that the new process may give you), use the spawn() API to start the program.

You also can use the capability provided in spawn() to allow the child process to start multiple threads. See the spawn() API documentation for a description of the SPAWN_SETTHREAD_NP flag in the inheritance structure.

A CL command for using SPAWN is also available from the QUSRTOOL library. See SPAWN CL command, QUSRTOOL example for more information about the SPAWN CL command.


Pthread APIs | APIs by category