Spawns a childprocess to execute a given command.
TIP: Shells that handle process suspension (e.g.,/bin/csh
) offer a more efficient way to get the same effect.
F77_Unformatted
Noclisym
TIP: You may want to specify Noclisym to help prevent commands redefined by symbol assignments from affecting the spawned commands.
TIP: You may want to specify Nolognam to help prevent commands redefined by logical name assignments from affecting the spawned commands.
Noshell is useful when performing many spawned operations from a program and speed is a primary concern. Since no shell is present, wildcard characters are not expanded, and other tasks normally performed by the shell do not occur.
Notify
SYS$OUTPUT
when the subprocess completes or aborts. Otherwise, no message is broadcast. This keyword should not be set unless the Nowait keyword is also set.Nowait
Pid
Sh
Unit
If present, causes SPAWN to create a child process in the usual manner, but instead of waiting for the specified command to finish, SPAWN attaches a bidirectional pipe between the child process and PV-WAVE. From the PV-WAVE session, the pipe appears as a logical file unit. The other end of the pipe is attached to the child process standard input and output.
NOTE: If the Unit keyword is used, the command parameter must also be present, and result is not allowed.
SHELL
environment variable. Under OpenVMS, the DCL command language interpreter is used.Once the child process is started, the PV-WAVE session can communicate with it using the normal input/output facilities. After the child process has done its task, the CLOSE procedure is used to delete the process and close the pipe.
Since SPAWN uses GET_LUN to allocate the file unit, FREE_LUN should be used to free the unit.
SPAWN,'ps -a'
.
NOTE: Also see the PV-WAVE GUI Application Developer's Guide