You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Andrew Schwartzmeyer <an...@schwartzmeyer.com> on 2017/03/31 23:52:25 UTC
Review Request 58127: Windows: Rewrote subprocess helpers.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58127/
-----------------------------------------------------------
Review request for mesos, Jeff Coffler, John Kordich, Joseph Wu, Li Li, and Michael Park.
Repository: mesos
Description
-------
Explicitly use `CreateProcessW` for proper Unicode support, and fix
`getSystemEnvironment` and `createProcessEnvironment` to support UTF-16.
Note that `wstring` has to be used over `u16string` due to an MSVC bug,
see MESOS-7335.
Most importantly, fix the following incorrect escaping algorithm:
std::string command = strings::join(" ", argv);
By replacing it with the rewritten `stringify_args` from `shell.hpp`.
This resolves problems using "advanced" arguments with `subprocess`:
.\mesos-containerizer.exe launch --help=false \
--launch_info={"command":{"shell":true,"value":"ping 127.0.0.1 -n 10000"}}
Diffs
-----
3rdparty/libprocess/include/process/windows/subprocess.hpp 1d93b08b035a5eaf677ead3356d0b4be808c39cc
Diff: https://reviews.apache.org/r/58127/diff/1/
Testing
-------
Testing done later in chain.
Note that this fixes the majority of the test failures originally reported in #57976.
Thanks,
Andrew Schwartzmeyer
Re: Review Request 58127: Windows: Rewrote subprocess helpers.
Posted by Joseph Wu <jo...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58127/#review171064
-----------------------------------------------------------
- Joseph Wu
On March 31, 2017, 4:52 p.m., Andrew Schwartzmeyer wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58127/
> -----------------------------------------------------------
>
> (Updated March 31, 2017, 4:52 p.m.)
>
>
> Review request for mesos, Jeff Coffler, John Kordich, Joseph Wu, Li Li, and Michael Park.
>
>
> Bugs: MESOS-5418
> https://issues.apache.org/jira/browse/MESOS-5418
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Explicitly use `CreateProcessW` for proper Unicode support, and fix
> `getSystemEnvironment` and `createProcessEnvironment` to support UTF-16.
> Note that `wstring` has to be used over `u16string` due to an MSVC bug,
> see MESOS-7335.
>
> Most importantly, fix the following incorrect escaping algorithm:
>
> std::string command = strings::join(" ", argv);
>
> By replacing it with the rewritten `stringify_args` from `shell.hpp`.
> This resolves problems using "advanced" arguments with `subprocess`:
>
> .\mesos-containerizer.exe launch --help=false \
> --launch_info={"command":{"shell":true,"value":"ping 127.0.0.1 -n 10000"}}
>
>
> Diffs
> -----
>
> 3rdparty/libprocess/include/process/windows/subprocess.hpp 1d93b08b035a5eaf677ead3356d0b4be808c39cc
>
>
> Diff: https://reviews.apache.org/r/58127/diff/1/
>
>
> Testing
> -------
>
> Testing done later in chain.
>
> Note that this fixes the majority of the test failures originally reported in #57976.
>
>
> Thanks,
>
> Andrew Schwartzmeyer
>
>
Re: Review Request 58127: Windows: Rewrote subprocess helpers.
Posted by Joseph Wu <jo...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58127/#review171037
-----------------------------------------------------------
Ship it!
Basically a refactoring. Looks functionally similar to before.
3rdparty/libprocess/include/process/windows/subprocess.hpp
Lines 173 (patched)
<https://reviews.apache.org/r/58127/#comment243870>
Over 80 characters, needs a newline.
3rdparty/libprocess/include/process/windows/subprocess.hpp
Line 230 (original), 239 (patched)
<https://reviews.apache.org/r/58127/#comment243871>
Slightly over 80 characters
3rdparty/libprocess/include/process/windows/subprocess.hpp
Line 237 (original), 246 (patched)
<https://reviews.apache.org/r/58127/#comment243872>
Slightly over 80 characters.
- Joseph Wu
On March 31, 2017, 4:52 p.m., Andrew Schwartzmeyer wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58127/
> -----------------------------------------------------------
>
> (Updated March 31, 2017, 4:52 p.m.)
>
>
> Review request for mesos, Jeff Coffler, John Kordich, Joseph Wu, Li Li, and Michael Park.
>
>
> Bugs: MESOS-5418
> https://issues.apache.org/jira/browse/MESOS-5418
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Explicitly use `CreateProcessW` for proper Unicode support, and fix
> `getSystemEnvironment` and `createProcessEnvironment` to support UTF-16.
> Note that `wstring` has to be used over `u16string` due to an MSVC bug,
> see MESOS-7335.
>
> Most importantly, fix the following incorrect escaping algorithm:
>
> std::string command = strings::join(" ", argv);
>
> By replacing it with the rewritten `stringify_args` from `shell.hpp`.
> This resolves problems using "advanced" arguments with `subprocess`:
>
> .\mesos-containerizer.exe launch --help=false \
> --launch_info={"command":{"shell":true,"value":"ping 127.0.0.1 -n 10000"}}
>
>
> Diffs
> -----
>
> 3rdparty/libprocess/include/process/windows/subprocess.hpp 1d93b08b035a5eaf677ead3356d0b4be808c39cc
>
>
> Diff: https://reviews.apache.org/r/58127/diff/1/
>
>
> Testing
> -------
>
> Testing done later in chain.
>
> Note that this fixes the majority of the test failures originally reported in #57976.
>
>
> Thanks,
>
> Andrew Schwartzmeyer
>
>