On 9/12/07, Justin Allegakoen <[EMAIL PROTECTED]> wrote:
> You have at least one open statement in there without an 'or die', I'm not 
> sure
> how much code you have since you snipped a lot, but an easy way to
>terminate on open errors would be for you to use Fatal:-
>
> use Fatal qw(open close);
>
> Opening files that are locked by other processes results in the behaviour
> that you describe.

On 9/12/07, Thurn, Martin <[EMAIL PROTECTED]> wrote:
>  Did you try 25,000 "clean" iterations, or some "dirty"  (i.e. run many
> concurrent copies, kill in the middle, etc.) ??
> Slurping the whole file rather than testing line by line should
> shorten the time holding the file open, which is always good.


I'm now trying multiple copies running concurrently, and added Fatal
to the mix.. I also started another loop that opens inittab in append
mode, ask for an exclusive lock ( flock($fh,2); ) sleeps a while
before unlocking and closing it..

So far no errors, as it really should be considering the simplicity of
that code anyway.. Just wondering what freak accident could have
happened on those servers..

If anyone has any other weird scenarios I could test send them my way
:-) Maybe playing with readdir and such ? Since it's a file with 0
bytes I'm trying to get it could either be a file open in write '>'
mode, or a delete file created fresh..

  Martin
_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to