Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^4: Tail'ing a log that frequently rolls over

by frd1963 (Initiate)
on Jan 13, 2009 at 17:02 UTC ( [id://736002]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Tail'ing a log that frequently rolls over
in thread Tail'ing a log that frequently rolls over

Thanks for the advice. I will be trying the code you provided to see if I get different results. I do notice that you use the "-F" option whereas the version of the tail.exe that I got from the above named site only accepts that in lower case. So we are obviously not using the same version of the utility, if even the same utility at all. Can you let me know where you got your version?

Also, I wasn't clear in my expectations of tail. I know it wouldn't have any way of knowing the file was no longer being written to, not would I want it to; but I did expect that when its parent process died (perl) it would die as well. Of course, I had to forcefully kill perl to get it to exit which may be the equivalent of a UNIX kill -9 which would explain why tail never exited. It is easy enough to keep track of the PID in perl and kill it when deemed necessary, so I can put the appropriate code in there, but perl hangs at the read and so can't get to the code where it will kill the PID, unless from another thread or by handling an asycronous signal.

Thanks again for the ideas and I will let you know what I find,
-Frd

  • Comment on Re^4: Tail'ing a log that frequently rolls over

Log In?
Username:
Password:

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

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

    No recent polls found