boost::process::search_path() and compound cmd

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

boost::process::search_path() and compound cmd

Boost - Users mailing list

Hi,

I need to execute the 'stdbuf -oL -eL python scrypt.py' cmd but if I
write the:
auto p = boost::process::search_path("stdbuf -oL -eL python2");
boost::process::child c(p, "script.py");
c.wait();

I get the exception with 'execve failed: Permission denied' message.


My question is, what should I change in my example for executing the
'stdbuf -oL -eL python2 scrypt.py' cmd?


Thanks.


--
Regards, niXman
___________________________________________________
Dual-target(32 & 64-bit) MinGW-W64 compilers for 32 and 64-bit Windows:
https://sf.net/p/mingw-w64/
_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: boost::process::search_path() and compound cmd

Boost - Users mailing list
On 11/05/2017 19:58, niXman via Boost-users wrote:

> I need to execute the 'stdbuf -oL -eL python scrypt.py' cmd but if I
> write the:
> auto p = boost::process::search_path("stdbuf -oL -eL python2");
> boost::process::child c(p, "script.py");
> c.wait();
>
> I get the exception with 'execve failed: Permission denied' message.
>
>
> My question is, what should I change in my example for executing the
> 'stdbuf -oL -eL python2 scrypt.py' cmd?

That's not a command.

stdbuf is one executable, and python2 is another.  Assuming that stdbuf
will itself search the path for python2, then you can probably get away
with specifying only "stdbuf" in the search_path call and then passing
everything else as arguments.


_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Loading...