Address review comments

This commit is contained in:
Benjamin Schaaf 2019-06-02 14:42:41 +10:00
parent ea3124778b
commit 0d4840b81d
2 changed files with 7 additions and 2 deletions

View file

@ -195,7 +195,7 @@ struct Process {
/** /**
An operating system handle to the process. An operating system handle to the process.
*/ */
@property int osHandle() const nothrow @nogc { return cast(int)m_pid; } @property int pid() const nothrow @nogc { return cast(int)m_pid; }
/** /**
Whether the process has exited. Whether the process has exited.
@ -724,7 +724,7 @@ private auto executeImpl(alias spawn, Cmd, Args...)(
return Tuple!(int, "status", string, "output")(processPipes.process.wait(), stringOutput); return Tuple!(int, "status", string, "output")(processPipes.process.wait(), stringOutput);
} }
/** /*
Collect the string output of a stream in a blocking fashion. Collect the string output of a stream in a blocking fashion.
Params: Params:
@ -734,6 +734,7 @@ private auto executeImpl(alias spawn, Cmd, Args...)(
Returns: Returns:
The collected data from the stream as a string. The collected data from the stream as a string.
*/ */
/// private
string collectOutput(InputStream)(InputStream stream, size_t nbytes = size_t.max) string collectOutput(InputStream)(InputStream stream, size_t nbytes = size_t.max)
@blocking @trusted if (isInputStream!InputStream) { @blocking @trusted if (isInputStream!InputStream) {
auto output = appender!string(); auto output = appender!string();

View file

@ -5,6 +5,8 @@ dependency "vibe-core" path="../"
+/ +/
module test; module test;
static if (__VERSION__ >= 2080) {
import core.thread; import core.thread;
import vibe.core.log; import vibe.core.log;
import vibe.core.core; import vibe.core.core;
@ -204,3 +206,5 @@ void main()
runEventLoop(); runEventLoop();
} }
}