

Description:
SPAWN generates a new subprocess using the first parameter as the impetus for
that process. nu/TPU suspends your edit session and runs the new subprocess,
returning to the parent process under DOS and UNIX when the spawned process is
finished (if a new shell has been generated by SPAWN) or with the termination of
the subprocess. The subprocess created by SPAWN cannot be mixed to relate the
processes returned by CREATE_PROCESS. The second parameter may be either the
keyword ON or OFF; ON is the default. If ON, control is returned to nu/TPU after
the command is completed. If OFF, control remains with the operating system
after the completion of the spawned command. Control is returned to nu/TPU when the
user issues an EXIT command to the operating system.
Syntax:
SPAWN
SPAWN ( string )
SPAWN ( string, {ON | OFF} )
Example:
The following command tells nu/TPU to issue the command COMPILE to the system
and return control to nu/TPU after compile is complete.
SPAWN ("compile", ON);
Errors:
TPU$_BADKEY Invalid keyword.
TPU$_CAPTIVE Subprocess couldn't be created.
TPU$_CREATEFAIL Subprocess couldn't be created.
TPU$_REQUIRESTERM Spawn not valid for nonwindowed nu/TPU.
TPU$_UNKKEYWORD Second parameter must be ON or OFF.
Related Builtins:
SPAWN