[Windows] Setting the capacity of the underline pipe

Open
#470 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
38/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
cpp

Research direction

Start by reading Boost.Asio's connect_pipe.ipp create_pipe implementation, linked in the issue, and trace how readable_pipe is created for Windows process output. Determine whether the pipe capacity can be configured through the current Boost Process and Asio paths; done means a supported way to increase it, or a documented limitation with appropriate coverage.

Written by the indexing model from the issue text.

Description

I have encountered a similar issue to Setting the capacity of the underline pipe. Linux only but on Windows.

My code is the following:

void RunProcess(const std::string& exePath, std::vector<std::string> args) {
  boost::asio::io_context ctx;
  boost::asio::readable_pipe stdOutPipe(ctx), stdErrPipe(ctx);
  boost::process::v2::process proc(ctx, exePath, args, boost::process::v2::process_stdio{ {}, stdOutPipe, stdErrPipe }, boost::process::v2::windows::show_window_hide);
  /* ... */

The readable_pipe gets a native pipe of only 8kb here: connect_pipe.ipp::create_pipe

8kb is very little if we need to get a lot of input from a process because the process will have to get blocked constantly until the pipe is cleared.

Is it possible to increase the pipe buffer size?

Dominant language
C++
Stars
145
Forks
151
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from boostorg/process

All issues in boostorg/process

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.