I don't think there's a good way to know that. Rather, you expect the process to be in a state where it's waiting for input if you run it in a certain way.
I think you need a psuedotty here. The rexpect crate looks promising, but I haven't used it.
The psuedotty is emulating a user at a terminal running a program by hand. So however you run a program in a terminal to make it prompt you for input would be that certain way. rexpect gives you a way to emulate that interactive behavior.
Ah sorry I was afraid of that. Maybe try looking at the winpty-rs crate? I use Linux and don't know how this would work on Windows, so maybe someone else has a better answer.