No such thing as a small change | |
PerlMonks |
Re^2: Testing for a background process waiting for inputby SBECK (Chaplain) |
on Apr 13, 2012 at 19:51 UTC ( [id://964978]=note: print w/replies, xml ) | Need Help?? |
This depends on knowing what the prompt will be, which I don't in this case. If I know what the prompt would be, of course I can just wait until I see it, but in this case I don't know what it'll be. I actually know what to do IF the program is waiting for input. What I need to be able to do is distinguish whether the background program is running (and just taking a while to complete) or if it's stalled waiting for input. In this situation, it's actually not critical that I be able to interact with the program... I just need to know what state it's in. That's why it's not absolutely critical that I use IPC::Open3 or RPC::Run... if I can have access to STDIN/STDOUT, that would be nice, but I'll do without if I have to. One more detail... the program will be sending stuff to STDOUT/STDERR, so the presense of output from the program doesn't signal that it's prompting for input.
In Section
Seekers of Perl Wisdom
|
|