Chris Benco said:

> If anyone has any ideas on how to improve this programs stability, how
> to make perl programs more stably in general, or even a possible reason
> why this, or any general purpose program might crash for unknown
> reasons let me know.  Looking for input of any kind on this issue.
>
> Have been thinking of writing some simple but very system specific
> network monitoring apps using perl and I really need to prove to myself
> that I can keep a perl script running for weeks at a time before I even
> start.


My first thought is that if you want stability, you are on the wrong
platform.  But I won't say that.

Instead, I have a couple of suggestions.  The first is to be wary of
signals, forks and threads.  You didn't tell us which version of Perl you
are running, nor your exact OS, but perl didn't get safe signals until
5.8.0.  Of course, Win32 does signals and forks differently to *nix, but
it doesn't look like your are using these features anyway.

The second is to watch out for memory usage.  I don't know whether your OS
has some way to monitor the memory usage of a process, but it might be
worth checking.  Perl has memory leaks.  Many leaks have been fixed in
5.8.0, so it might be worth upgrading if you haven't already.  I think
that for Win32 that means compiling your own version at the moment.

You might also like to try rewriting your script without the gotos.  Not
necessarily because of stylistic reasons, but simply because they are not
used much, and it is possible that there might be memory leaks hiding
behind them.

-- 
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to