NAME

ACE_Process - Process

SYNOPSIS

#include <ace/Process.h>

class ACE_Process { public: ACE_Process (void); virtual ~ACE_Process (void); virtual int prepare (ACE_Process_Options &options); virtual pid_t spawn (ACE_Process_Options &options); virtual void parent (pid_t child); virtual void child (pid_t parent); virtual void unmanage (void); pid_t wait (ACE_exitcode *status = 0, int wait_options = 0); pid_t wait (const ACE_Time_Value &tv, ACE_exitcode *status = 0); int kill (int signum = SIGINT); int terminate (void); pid_t getpid (void) const; ACE_HANDLE gethandle (void) const; int running (void) const; int exit_code (void) const; void exit_code (int code); PROCESS_INFORMATION process_info (void); protected: PROCESS_INFORMATION process_info_; pid_t child_id_; int exit_code_; };

DESCRIPTION

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.

PUBLIC MEMBERS

ACE_Process (void);

virtual ~ACE_Process (void);

virtual int prepare (ACE_Process_Options &options);

virtual pid_t spawn (ACE_Process_Options &options);

virtual void parent (pid_t child);

virtual void child (pid_t parent);

virtual void unmanage (void);

pid_t wait (ACE_exitcode *status = 0, int wait_options = 0);

pid_t wait (const ACE_Time_Value &tv, ACE_exitcode *status = 0);

int kill (int signum = SIGINT);

int terminate (void);

pid_t getpid (void) const;

ACE_HANDLE gethandle (void) const;

int running (void) const;

int exit_code (void) const;

void exit_code (int code);

PROCESS_INFORMATION process_info (void);

PROTECTED MEMBERS

PROCESS_INFORMATION process_info_;

pid_t child_id_;

int exit_code_;

AUTHOR

Tim Harrison harrison@cs.wustl.edu

LIBRARY

ace