Boost logo

Boost :

Subject: Re: [boost] [boost-process] Beta & Review
From: Klemens Morgenstern (klemens.morgenstern_at_[hidden])
Date: 2016-07-18 11:41:16

Am 18.07.2016 um 16:12 schrieb Zach Laine:
> This submission looks like it's heading very much in the right direction.
> We really need a standard facility for process launches, and this a Boost
> lib is a good first step.
Thanks, I'm glad to hear that.
> I submitted a PR for a documentation typo, but other than that, I only have
> one note. From the docs:
> "Async pipes use named pipes on windows. Therefore an exception is thrown
> if a pipe was not constructed as a named pipe and is converted to an
> async_pipe"
> It is widely considered to be bad practice to throw on programmer errors.
> It sounds like you should be asserting on invalid async_pipe conversions,
> since the precondition for doing so has not been met. Throwing is for
> conditions that could not have been fixed at the time the user wrote the
> code (like a failed parse of something read off a wire, for instance).

Ok, I'll have to think about that. The problem is: you can construct a
pipe with a name, making it usable with async_pipe, i.e.:

pipe p;
async_pipe ap(p); //exception.

pipe p(".\\\\pipe\\some_pipe");
async_pipe ap(p);

And if you have a function which expects a pipe, it may not be visible
which sort of pipe is passed, so it ought to be handles at runtime.

Boost list run by bdawes at, gregod at, cpdaniel at, john at