- 积分
- 5
- 注册时间
- 2005-10-24
- 仿真币
-
- 最后登录
- 1970-1-1
|
发表于 2007-4-12 11:07:08
|
显示全部楼层
来自 LAN
utl_process_spawn( command, wait )
Description:
The program will execute a “fork” system call (or “vfork”, depending on the specific machine implementation) followed by an “execvp” system call with the “command” specified by the caller as its argument. The spawned command becomes a “process group leader.” This allows all processes created by this spawned process to be killed via the abort button or UTL_PROCESS_KILL. Redirection cannot be used in subprocess commands entered via utl_process_spawn. If redirection is required for the subprocess it is recommended that a bourne shell script be created which accepts the redirected input and output files as arguments and then issues the actual command of interest, including the redirection. This bourne shell script is what should be input to the utl_process_spawn function in this case.
Input:
STRING command Command string to execute.
LOGICAL wait True to wait for completion before continuing. False to execute command asynchronously.
Output:
INTEGER <Return Value> If WAIT is TRUE, then a return code is returned which needs to be checked by utl_process_error. If WAIT is FALSE, then the process group ID of the subprocess is returned. On Windows NT if WAIT is FALSE, then zero is returned.
Error Conditions:
None.
Example:
stat = utl_process_spawn( “lpr results.out”, TRUE )
IF( utl_process_error( stat ) ) THEN
utl_display_process_error( stat, 3 )
END IF
Important: The spawned process must not return the value 253. This value is reserved for MSC internal use. |
|