Whats the best way to spawn an external process with vibe and process its stdout and stderr
christian.koestlin
christian.koestlin at gmail.com
Sat Oct 7 19:18:22 UTC 2023
Recently I wanted to wrap a small d program around an external
process and stream its stdout/stderr to the original
stdout/stderr of the d program (no other output while the
external process is running).
I first tried to implement this with vibe's fibers, but after
failing first try, I resolved to std.concurrency to get the thing
done.
It's not a bad solution, but a fiber based thing should be so
much nicer, so I tried again in an isolated project
(https://github.com/gizmomogwai/vibe-process).
Unfortunately my `v0` looks nice, but does not process the output
as it should.
`v2` is my favorite, but far aways from the clean solution of
`v0`.
So the question is, how to make a nicer solution, that also
really cleans up in the end.
Kind regards,
Christian
More information about the Digitalmars-d-learn
mailing list