Boost logo

Boost Users :

Subject: Re: [Boost-users] [process] How to exec multiple shell commands
From: Ilya Sokolov (ilyasokol_at_[hidden])
Date: 2008-12-17 02:23:12


Konstantin Litvinenko пишет:
> Ilya Sokolov пишет:
>> Konstantin Litvinenko wrote:
>>> Hi!
>>> I have successfully used boost.process but now stuck with a problem.
>>> I need to execute 2 commands in one shell invocation. Both windows
>>> and linux allow do that, but I can't figure out how to do it with
>>> help of boost.process. Is there interface to do that?
>>>
>>> PS. I am using old boost.process. I have download process-is-0.4.zip
>>> from the vault and didn't find solution for my problem.
>>
>> Try this (untested):
>> launch_shell("echo first & echo second", context());
>> You can also use && and ||
>
> Thenx, Ilya, but this is not a solution because it is not posible to
> invoke:
>
> launch_shell("\"\"C:\\Program Files\\Microsoft Visual Studio
> 8\\VC\\bin\\vcvars32.bat\" && cl.exe /c .\main.cpp -Fo.\bin\main.obj\"",
> context());

Try to remove one pair or quotes (untested again):
launch_shell("\"C:\\Program Files\\Microsoft Visual Studio
8\\VC\\bin\\vcvars32.bat\" && cl.exe /c .\main.cpp -Fo.\bin\main.obj",
context());


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net