Uh oh!
There was an error while loading. Please reload this page.
Fix child process spawning on linux - #773
Conversation
| boost::filesystem::path(proc.working_dir); | ||
| BOOST_LOG(info) << "Spawning ["sv << cmd << "] in ["sv << working_dir << ']'; | ||
| auto child = platf::run_unprivileged(cmd, working_dir, _env, _pipe.get(), ec); | ||
| bp::group child_group; |
There was a problem hiding this comment.
Note: I don't really like this myself that there is a need to pass a temporary group, but I don't know how to do it optionally without creating 2 function versions. The boost::child constructor is just meh...
FrogTheFrog
commented
Jan 14, 2023
Got an advice that temporary group could have had some strange behavior on Windows, so duplicating code instead :/ |
FrogTheFrog
commented
Jan 16, 2023
@cgutman Sorry to tag you like this, but could I ask for a review from you? Since I know you're more knowledgeable about |
FrogTheFrog
commented
Jan 18, 2023
It seems that ctor does not accept PID with other arguments. Since it was working this way on Windows before and it's only broken on linux, the child can be added to the group manually via method. |
Description
This solves a bug introduced accidentally by #600.
When starting an attached command/process on linux, you are welcomed by this error:

It seems that for whatever reason, if your child is going to be in a process group, it has to be in it from the start boostorg/process#164 in order for the group methods to work properly.
Type of Change
.github/...)Checklist
Branch Updates
LizardByte requires that branches be up-to-date before merging. This means that after any PR is merged, this branch
must be updated before it can be merged. You must also
Allow edits from maintainers.