Boost Process fails on Solaris 10 in async mode

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Boost Process fails on Solaris 10 in async mode

Boost - Users mailing list

I tried installing boost process on my Solaris 10 Sparc machine. On compiling it using gcc-6.3.0, I ran into a static assert failure at compile time at In order to fix that, I changed 
static_assert(!WIFEXITED(still_active) && !WIFSIGNALED(still_active), "Internal Error");
to static_assert(!WIFEXITED(still_active), "Internal Error");

There is some discussion about this at

Now,  the following code works well onCentOS 7(where no change was made to Boost process), but fails on Solaris 10 (where I made the above change as a workaround). On Solaris 10, the return code is 127 and stdout and stderr are empty.

#include <iostream>
#include <thread>
#include <boost/process.hpp>
#include <boost/asio.hpp>

namespace bp = boost::process ;
int main(int argc, char** argv)
    std::future<std::string> dataOut;
    std::future<std::string> dataErr;

    std::string command = "ls";
    boost::asio::io_service ios;
    bp::child c(command, bp::std_out > dataOut, bp::std_err > dataErr, ios);;
    int result = c.exit_code();
    std::string stdOut = dataOut.get();
    std::string stdErr = dataErr.get();
    std::cout << "Exit Code " << result  << std::endl;
    std::cout << "stdOut " << stdOut  << std::endl;
    std::cout << "stdErr " << stdErr  << std::endl;
    return 0;

Output on CentOS 7

Exit Code 0
stdOut a.out


Output on Solaris 10

Exit Code 127
1. Has my workaround to install Boost process on Solaris 10 broken it? 
2. Is Boost-1.68.0 not supported on Solaris? 
3. Is there a way I can get Boost Process to work on Solaris 10 in async mode? 


Boost-users mailing list
[hidden email]