D: How do I pipe (|) through three programs using std.process?

Adam D Ruppe destructionator at gmail.com
Sun Nov 12 13:48:27 UTC 2023


On Sunday, 12 November 2023 at 13:39:25 UTC, BoQsc wrote:
> However the question of why `spawnProcess(["find", "string to 
> find"]` is not working and produces error is still unresolved.

spawnProcess always encodes its arguments in a very specific way 
and the receiving programs are not always compatible with that 
thing.

A Windows process does not take an array of args, but rather a 
single string command line. spawnProcess tries to turn the 
unix-style array into a single string that can then be turned 
back into arguments by the receiving program. But it makes a lot 
of assumptions in how that happens that just don't always match 
reality.


More information about the Digitalmars-d-learn mailing list