[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] sleep vs. other method



At 4:08 PM -0400 9/17/99, Ronald J Kimball wrote:
>On Fri, Sep 17, 1999 at 01:49:01PM -0500, Jefferson R. Lowrey wrote:
>> The difficulty I'm having is that this loop terminates before I'd like it
>> too.  What's happening is that lines are not being added to the log fast
>> enough.
>>
>> I could very easily increase the sleep time.  I am also looking into other
>> ways of telling if the installs I'm looking at are finished - because
>> waiting until the log doesn't change any more is not a great way to do it,
>> as it might potentially never stop changing.  That's not very likely, and
>> watching the log is the most straightforward method, I think.
>>
>> I'm looking for some other ideas, though. I realize that most of you don't
>> have netOctopus lying around, but I'm asking about a more general problem.
>>
>
>Isn't this a tail -f type problem?  Have you checked the FAQ's answer to
>this question?

Not really, I think.  I hadn't checked the FAQ(shame on me), but unless I'm
looking at the wrong one, it doesn't address the issue.  The FAQ I'm
looking at is "How do I do a tail-f in Perl".

That's not my problem.  While the log is actually kept in a file, I don't
want nor need to access it from that file - and I'm emulating a tail-f with
the code I use to get the lines from netOctopus.  I am asking something
like "Is there a good way in MacPerl, aside from using sleep, to check on
something periodically?".  I know that sleep is a good way, but I'm asking
about other ways.

>
>If the log is never going to stop changing, how do you know when the install
>is done?

Well, it will stop changing - if I'm not interacting with the program -
once the installs are finished.  NetOctopus is an application, not a
daemon.  My other basic thought is to keep checking until the all users
have either finished or errored out.  That is more likely to run forever
than checking the log, though, since installs can occasionally just go
idle.

-Jeff Lowrey



===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org