OK, so here's what I'm trying to do :
assert
check.How is that possible?
NOTE:
Guys, sorry if I mislead you. I'm looking for a solution in D.
Here is a way to do this using pipes and threads (which, unlike the suggested duplicate, is not limited to a predefined buffer size or risks a buffer overflow vulnerabillity):
std.process.pipe
stdout
to the pipe's write end (back it up first)stdout
I have some similar code, albeit in the other direction (asynchronous writing as opposed to reading), here and here.