Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re^5: Check for a new line

by dasgar (Priest)
on Jan 27, 2014 at 15:46 UTC ( #1072242=note: print w/replies, xml ) Need Help??

in reply to Re^4: Check for a new line
in thread Check for a new line

My initial thoughts are that "program A" might be the best place to be adding this error checking and logging. Not sure if modifying "program A" is an option.

Another route would be to have the Perl script check periodically to see if "program B" is still running. Of course, this method might not be able to distinguish between a) up and running properly and b) running but not responding.

The only other way that I can think of is to have the Perl script periodically check on the file that "program A" is writing to. You could use something like stat to check for the last modified time stamp. I haven't use this module, but it looks File::Monitor might be another method for checking to see if the file has changed.

Perhaps more knowledgable and experienced monks can come up with better solutions/ideas. Thought I'd toss out these ideas in case one of them might help you out.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1072242]
and the grasshoppers chirp...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (2)
As of 2018-05-27 22:03 GMT
Find Nodes?
    Voting Booth?