How would I retrieve the stdout error message of a system/shell command?

Steven Schveighoffer schveiguy at yahoo.com
Thu Sep 8 11:20:12 PDT 2011


On Thu, 08 Sep 2011 14:14:40 -0400, Justin Whear  
<justin at economicmodeling.com> wrote:

> For posterity's sake, the "correct" (and much more complicated way) is to
> use pipes and fork(). Here's a Posix-only implementation I wrote a while
> ago: http://pastebin.com/CBYw4fDU
>
> No guarantees on the code, but it demonstrates how to set up the pipes,  
> etc.
> The cool thing is that it supports full two-way communication--the parent
> process can write to the child's stdin and read from both stdout and  
> stderr.

This is the plan for the revamped version of std.process, which is held up  
waiting for DMC changes.

-Steve


More information about the Digitalmars-d-learn mailing list