class Poco::ProcessHandle

Overview

A handle for a process created with Process::launch(). Moreā€¦

#include <Process.h>

class ProcessHandle
{
public:
    // typedefs

    typedef ProcessImpl::PIDImpl PID;

    // construction

    ProcessHandle(const ProcessHandle& handle);

    // methods

    ProcessHandle&
    operator=(const ProcessHandle& handle);

    PID
    id() const;

    int
    wait() const;

protected:
    // construction

    ProcessHandle(ProcessHandleImpl* pImpl);
};

Detailed Documentation

A handle for a process created with Process::launch().

This handle can be used to determine the process ID of the newly created process and it can be used to wait for the completion of a process.

Construction

ProcessHandle(const ProcessHandle& handle)

Creates a ProcessHandle by copying another one.

Methods

ProcessHandle&
operator=(const ProcessHandle& handle)

Assigns another handle.

PID
id() const

Returns the process ID.

int
wait() const

Waits for the process to terminate and returns the exit code of the process.