## NAME

ACE_Process - Process

## SYNOPSIS

    #include <ace/Process.h>

    class ACE_Process
    {
      public:
        ACE_Process (void);
        ~ACE_Process (void);
        pid_t spawn (ACE_Process_Options &options);
        int wait (int *status = 0);
        int wait (const ACE_Time_Value &tv);
        int kill (int signum = SIGINT);
        int terminate (void);
        pid_t getpid (void);
        PROCESS_INFORMATION process_info (void);
      protected:
        PROCESS_INFORMATION process_info_;
        pid_t child_id_;
    };

## 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);

Default construction. Must use ACE_Process::start.

    ~ACE_Process (void);

Destructor.

    pid_t spawn (ACE_Process_Options &options);

Launch the process described by `options`.

    int wait (int *status = 0);

Wait for the process we just created to exit.

    int wait (const ACE_Time_Value &tv);

Timed wait for the process we just created to exit.

    int kill (int signum = SIGINT);

Send the process a signal. This is only portable to operating systems that support signals (e.g., POSIX).

    int terminate (void);

Terminate the process. This call doesn't give the process a chance to cleanup, so use with caution...

    pid_t getpid (void);

Return the pid of the new process.

    PROCESS_INFORMATION process_info (void);

## PROTECTED MEMBERS

    PROCESS_INFORMATION process_info_;

    pid_t child_id_;

Process id of the child.

## AUTHOR

Tim Harrison `harrison@cs.wustl.edu`

## LIBRARY

ace