Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^2: Testing for a background process waiting for input

by SBECK (Chaplain)
on Apr 13, 2012 at 19:51 UTC ( [id://964978]=note: print w/replies, xml ) Need Help??


in reply to Re: Testing for a background process waiting for input
in thread Testing for a background process waiting for input

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.

  • Comment on Re^2: Testing for a background process waiting for input

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://964978]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2024-04-19 22:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found