[Boost-bugs] [Boost C++ Libraries] #13085: Bad command line escaping for Windows shell

Subject: [Boost-bugs] [Boost C++ Libraries] #13085: Bad command line escaping for Windows shell
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2017-06-20 08:53:02


#13085: Bad command line escaping for Windows shell
----------------------------------+---------------------
 Reporter: Salamandar <felix@…> | Owner:
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: process
  Version: Boost 1.64.0 | Severity: Problem
 Keywords: |
----------------------------------+---------------------
 I'm trying to launch a command with the windows shell:

 {{{
 #!bash
 call "%VS140COMNTOOLS%\vsvars32.bat"
 }}}
 so the source is: (i have to escape the double-quotes and antislash)
 {{{
 #!c++
 std::string getCommandLine() {
   return "call \"%VS140COMNTOOLS%\\vsvars32.bat\""
 }
 bp::child child(getCommandLine(), bp::shell);
 }}}

 The problem is that Boost is double-escaping the double-quotes, and the
 windows shell does not understand that:
 {{{
 Error: '\"C:\Program Files (x86)\Microsoft Visual Studio
 14.0\Common7\Tools\\vsvars32.bat\"' is not recognized as an internal or
 external command, operable program or batch file.

 The problem resides here :
 boost/process/detail/windows/basic_cmd.hpp :35 :48 :72

 I just had to comment these lines to fix the command line and spawn the
 shell with the correct args.
 }}}

--
Ticket URL: <https://svn.boost.org/trac10/boost/ticket/13085>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-06-20 08:56:42 UTC