Skip to content
This repository has been archived by the owner on Jun 11, 2022. It is now read-only.

Process Groups #8

Closed
klemens-morgenstern opened this issue May 3, 2016 · 1 comment
Closed

Process Groups #8

klemens-morgenstern opened this issue May 3, 2016 · 1 comment

Comments

@klemens-morgenstern
Copy link
Owner

Synopsis:

bool this_process::is_grouped(); 

struct group
{
    group();
    void wait();
    void terminate();
    void detach();
    /**/ native_handle();
    void assign(child &);
};

Putting a process into another group:

group g;
execute("gcc", g);

Problem: the this_process::group() cannot be implemented in a proper way, since I cannot get the handle of the current process group on windows. BUT I can create a group and assign the current process to it, if it does NOT have a group assigned to it. The latter is also a windows constraint.

I.e. done like this:

group g;
auto c = execute("gcc");
g.assign(c);

That throws if this_process is already assigned to a group (windows constraint).

For Posix: this is done indirectly, a group will have a bool which says if it's initialized. If it is not initialized it will be after fork and write the gid into a self-pipe.

@klemens-morgenstern
Copy link
Owner Author

Does work.

klemens-morgenstern added a commit that referenced this issue May 1, 2017
Overloading boost::process::detail::throw_last_error() for Xcode's clang++
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant