Boost logo

Boost :

Subject: Re: [boost] Subject: Formal Review of Proposed Boost.Process library starts tomorrow
From: Oliver Kowalke (k-oli_at_[hidden])
Date: 2011-02-07 14:24:24


I would suggest to provide a function indicating if you are running on a
POSIX platform:

bool is_posix_platform();

if ( boost::process::is_posix_platform() ) {
    ...
}

The lib could provide an encapsulation for testing the exit code against
WIFEXITED, WEXITSTATUS, WIFSIGNALED, WTERMSIG, WIFSTOPPED, WSTOPSIG,
WIFCONTINUED, WCOREDUMP (as the old version of boost.process did).

posix_status ps( status);
if ( ps.terminated() ) int sig = ps.termination_signal();
if ( ps.has_coredump() ) ...

Sending signals (SIGSTOP, SIGCONT, SIGKILL, etc.) to the process would
also be usefull.

You could raise an assertion (BOOST_ASSERT) if this functionality will
be invoked by a non-POSIX platform.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk