pipeProcess not returning immediately

Johnson Jones via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Aug 25 18:13:35 PDT 2017


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.

pipeProcess is suppose to return immediately/run asynchronously, 
and it does with ffmpeg or other programs that return. (which I 
do not know if it is returning immediately or not on those 
because they execute so quickly)

But I have a feeling it is not running asynchronously at all. Any 
ideas? This is on windows and simply calling pipeProcess directly 
with a simple "ffplay filename" example.

ffplay opens up a window showing the spectrogram while the file 
is playing. After I close it out, my app then does what it is 
suppose to. This suggests the pipeProcess is not running 
asynchronously.

		void ExecuteCommand(T...)(T args)
		{
			foreach(t; AliasSeq!T)
				static assert(is(t == string), 
typeof(this).stringof~":"~__PRETTY_FUNCTION__~" requires string 
arguments!");

			pipes = pipeProcess([args[0], (AliasSeq!args)[1..$]], 
Redirect.stdout);
}

call it like

ExecuteCommand("ffplay.exe", "test.wav");




More information about the Digitalmars-d-learn mailing list