ACE_Process Class ReferenceProcess. More...
Inheritance diagram for ACE_Process:
![]()
Collaboration diagram for ACE_Process:
![]()
Detailed DescriptionProcess.A Portable encapsulation for creating new processes. Notice that on UNIX platforms, if the <setenv> is used, the <spawn> is using the <execve> system call. It means that the <command_line> should include a full path to the program file (<execve> does not search the PATH). If <setenv> is not used then, the <spawn> is using the <execvp> which searches for the program file in the PATH variable. Constructor & Destructor Documentation
Default construction. Must use <ACE_Process::spawn> to start.
Destructor.
Member Function Documentation
Called just before <ACE_OS::fork> in the <spawn>. If this returns non-zero, the <spawn> is aborted (and returns ACE_INVALID_PID). The default simply returns zero.
Launch a new process as described by options. On success, returns 1 if the option avoid_zombies is set, else returns the process id of the newly spawned child. Returns -1 on failure. This will be fixed in the future versions of ACE when the process id of the child will be returned regardless of the option.
Called just after <ACE_OS::fork> in the parent's context, if the <fork> succeeds. The default is to do nothing.
Called just after <ACE_OS::fork> in the child's context. The default does nothing. This function is *not* called on Win32 because the process-creation scheme does not allow it.
Called by a <Process_Manager> that is removing this Process from its table of managed Processes. Default is to do nothing. Reimplemented in ACE_Managed_Process.
Wait for the process we've created to exit. If <status> != 0, it points to an integer where the function store the exit status of child process to. If <wait_options> == <WNOHANG> then return 0 and don't block if the child process hasn't exited yet. A return value of -1 represents the <wait> operation failed, otherwise, the child process id is returned.
Timed wait for the process we've created to exit. A return value of -1 indicates that the something failed; 0 indicates that a timeout occurred. Otherwise, the child's process id is returned. If <status> != 0, it points to an integer where the function stores the child's exit status.
Send the process a signal. This is only portable to operating systems that support signals, such as UNIX/POSIX.
Terminate the process abruptly using <ACE::terminate_process>. This call doesn't give the process a chance to cleanup, so use it with caution...
Return the process id of the new child process.
Return the handle of the process, if it has one.
Return 1 if running; 0 otherwise.
Return the Process' exit code. This method returns the raw exit status returned from system APIs (such as <wait> or <waitpid>). This value is system dependent.
Return the Process' return value. This method returns the actual return value that a child process returns or <exit>s.
Close all the handles in the set obtained from the
Close all the handles in the set obtained from the
Set this process' <exit_code_>. ACE_Process_Manager uses this method to set the <exit_code_> after successfully waiting for this process to exit.
Friends And Related Function Documentation
Member Data Documentation
Set of handles that were passed to the child process.
Handle duplicates made for the child process.
The documentation for this class was generated from the following files: Generated on Mon Sep 15 07:16:13 2008 for ACE by ![]() |