pipeProcess not returning immediately
FoxyBrown via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sat Aug 26 01:08:15 PDT 2017
On Saturday, 26 August 2017 at 06:24:26 UTC, user1234 wrote:
> On Saturday, 26 August 2017 at 01:13:35 UTC, Johnson Jones
> wrote:
>> I am running ffplay.exe and my application does not return
>> immediately from pipeProcess. I have to close ffplay for my
>> program to continue execution.
>
> No process is asynchronous in std.process.
>
> If you don't want to block your program then wrap it in a
> thread that checks periodically for termination.
Either you are wrong or the docks are wrong:
https://dlang.org/phobos/std_process.html
pipeProcess also spawns a child process which runs in
**parallel** with its parent. However, instead of taking
arbitrary streams, it automatically creates a set of pipes that
allow the parent to communicate with the child through the
child's standard input, output, and/or error streams. This
function corresponds roughly to C's popen function.
More information about the Digitalmars-d-learn
mailing list