std::system() and boost::process::system() are incompatible
- Dominant language
- C++
- Stars
- 145
- Forks
- 151
- PR merge metrics
- No merged PRs in 30d
Description
The documentation states:
> With the standard library this looks like this.
```
int result = std::system("g++ main.cpp");
```
>Which we can write exactly like this in boost.process.
```
namespace bp = boost::process; //we will assume this for all further examples
int result = bp::system("g++ main.cpp");
```
While this documentation is technically correct, it creates a false impression that `std::system` and `boost::process::system` are interchangeable, while in fact they are not. Proof MWE:
```
#include
int main()
{
boost::process::system( "ls *" );
std::system( "ls *" );
}
```
running `a.out` in directory with only `a.out` present produces:
```
lockywolf@laptop:/tmp/test/empty>./a.out
ls: cannot access '*': No such file or directory
a.out
```
This is either a bug in `boost::process::system` (if it is expected to match `std::system`) or it would be very nice to clarify this in the documentation.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.