I using boost 1\_65\_1 and try to run a process on MacOS.
my main process is running as root 
I need to launch a sub launch as a normal user.
My command line:
su user\_name -c "full The path to the Executable file".
when I run the command line in the terminal as root it working.

When I try to run it using Boost Process the Process "su" is running but exit immediately with error 2.

My code for running the Process:

```
void RunProcess(std::string a_PathToExe, std::vector<std::string> a_Args, io_servicePtr a_pIoServicePtr,
                ProcessExitCallBack a_pProcessExitCallBack) {

    Error l_Error;
    std::stringstream l_ShellCommandLine;
    ProcessHandlePtr l_pProcess = NULL;
    boost::process::group l_Group;
    boost::shared_ptr<boost::process::async_pipe> l_PipeOutputStream =
        boost::shared_ptr<boost::process::async_pipe>(new boost::process::async_pipe(*(a_pIoServicePtr.get())));
    boost::shared_ptr<boost::process::async_pipe> l_PipeError =
        boost::shared_ptr<boost::process::async_pipe>(new boost::process::async_pipe(*(a_pIoServicePtr.get())));

    try {

        l_ShellCommandLine << "\"" << a_PathToExe << "\""
                           << " ";
        for (size_t i = 0; i < a_Args.size(); ++i) {
            l_ShellCommandLine << a_Args.at(i) << " ";
        }

        l_pProcess = ProcessHandlePtr(new boost::process::child(
            l_ShellCommandLine.str(), boost::process::std_in.close(),
            boost::process::std_out > *(l_PipeOutputStream.get()), boost::process::std_err > *(l_PipeError.get()),
            *(a_pIoServicePtr.get()), l_Group, boost::process::shell,
            boost::process::on_exit = [](int exit, const std::error_code &ec_in) {
                WRITE_INFO_LOG("The process exit with error %d %s", exit, ec_in.message().c_str());
            }));

        l_PID = l_pProcess->id();
        WaiteForProcessToExit(l_pProcess, l_PipeOutputStream, l_PipeError, a_pProcessExitCallBack);
    }

    catch (std::exception &e) {

    } catch (...) {
    }
    return;
}

void WaiteForProcessToExit(ProcessHandlePtr a_pProcessHandle,
                           boost::shared_ptr<boost::process::async_pipe> a_PipeOutputStream,
                           boost::shared_ptr<boost::process::async_pipe> a_PipeError,
                           ProcessExitCallBack a_pProcessExitCallBack) {

    std::array<char, 1024> buffer = std::array<char, 1024>{};
    a_PipeOutputStream->async_read_some(
        boost::process::buffer(buffer), [=](boost::system::error_code ec, size_t transferre) {
            if (transferre > 0) {
                std::string Line = std::string(buffer.data());
                WRITE_INFO_LOG("%s", Line.c_str());
            }

            if (ec != 0) {

                WRITE_INFO_LOG("The Process %d has exit with error code %d", a_pProcessHandle->id(), ec);
                if (a_pProcessExitCallBack != NULL) {
                    a_pProcessExitCallBack(a_pProcessHandle->id(), Error());
                }
            } else {
                WaiteForProcessToExit(a_pProcessHandle, a_PipeOutputStream, a_PipeError, a_pProcessExitCallBack);
            }
        });
}

```

why the sub prosess it not running?
Thanks in advance