Will I be able to forward stdin to a spawned process?

This is my first time I’m writing to any Zig communities. I’ve been only playing with Zig for a few weeks, finished the ziglings (except async part that apparently doesn’t compile yet) and wrote some tests while following the Introduction. I’m really impressed by a lot of ideas, especially comptime and that “C is not an ultimate evil” is a really awesome approach. It’s making so much sense, so I really want to write some Zig as my hobby and possibly for my work in the future.

Now what I’m hoping to get my hands dirty with Zig is by attempting to write a little script which intent is to replace my Elixir’s mix setup sequencer (nothing really too exciting, link to src.)

What I bumped into while rewriting it to the next level, is that there seems to be no way to forward an input from my currently running shell to the spawned command, which basically requests for a user input (Yn questions basically) at some point. That happens when the mix-based file generator is attempting to write over some files that have been created previously.

So I’m asking, before proceeding to rewrite it in Zig, whether I’ll be able to achieve this with Zig or not.

Basically, this is how I view the problem so far (bear in mind I’m mainly using Windows for coding and targeting other platforms from it):

Main process spawns another script, by calling cmd /c followed by an mix.bat script with a bunch of command line options and waits for its streaming to stdout / stderr and outputs it into Windows “shell”.

Spawned process optionally requests for an input and at this moment I’m hoping to actually know that time came to accept the input and forward it to the running process.

I might be not really addressing it the right way, so I’m asking kindly to guide me to the right direction.