You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Andrew Schwartzmeyer (JIRA)" <ji...@apache.org> on 2017/04/06 17:15:42 UTC

[jira] [Commented] (MESOS-5522) Add Windows quotes escaping for arguments

    [ https://issues.apache.org/jira/browse/MESOS-5522?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15959336#comment-15959336 ] 

Andrew Schwartzmeyer commented on MESOS-5522:
---------------------------------------------

commit 41defd44ec6966c7cca97de5090404ab16e0072f
Author: Andrew Schwartzmeyer <an...@schwartzmeyer.com>
Date:   Tue Apr 4 12:44:21 2017 -0700

    Windows: Rewrote subprocess helpers to use wide strings.
    
    This command changes the Windows subprocess helpers to use
    `std::wstring` internally and the related wide-string variants of
    the Windows API (i.e. `CreateProcessW`) for proper Unicode support.
    
    NOTE: `std::wstring` must to be used instead of `std::u16string`
    due to an MSVC bug, see MESOS-7335.
    
    This also fixes the following incorrect string-escaping algorithm:
    
        std::string command = strings::join(" ", argv);
    
    By replacing it with the rewritten `stringify_args` from
    `windows/shell.hpp`.  This resolves problems using when any
    arguments that contain "special" characters (whitespace or quotes)
    with `subprocess`.
    
    Review: https://reviews.apache.org/r/58127/

> Add Windows quotes escaping for arguments
> -----------------------------------------
>
>                 Key: MESOS-5522
>                 URL: https://issues.apache.org/jira/browse/MESOS-5522
>             Project: Mesos
>          Issue Type: Improvement
>            Reporter: Daniel Pravat
>            Assignee: Andrew Schwartzmeyer
>
> In Windows, that arguments containing spaces be surrounded by double quotation marks. 
> https://blogs.msdn.microsoft.com/twistylittlepassagesallalike/2011/04/23/everyone-quotes-command-line-arguments-the-wrong-way/



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)