There is an awful lot of ... misunderstanding going on in this thread, and it is mostly caused by you wrongly describing the problem. Until you post the scripts that I can run that demonstrate the problem you are describing, I do not believe what you are saying is happening is possible.

For example, save the following three scripts and run them, and barring some external influence, like disk full, disk failure, or a third party piece of software taking exclusive access to the interchange file, it will run forever without errors.

##609823.pl #! perl -slw use strict; my $count; while( 1 ) { print "Iteration: ", ++$count; system 'perl 609823-1.pl'; system 'perl 609823-2.pl'; } ## 609823-1.pl #! perl -slw use strict; my $count = int rand 100; open OUT, '>', 'output.txt' or die $!; print OUT 'A line of junk' for 1 .. $count; close OUT; printf "Wrote $count lines \t"; ## 609823-2.pl #! perl -slw use strict; open IN, '<', 'output.txt' or die $!; my @lines = <IN>; printf "Read %d lines \t", scalar @lines; close IN; unlink 'output.txt'; ## Produces c:\test>609823 Iteration: 1 Wrote 72 lines Read 72 lines Iteration: 2 Wrote 19 lines Read 19 lines Iteration: 3 Wrote 97 lines Read 97 lines Iteration: 4 Wrote 58 lines Read 58 lines Iteration: 5 Wrote 94 lines Read 94 lines Iteration: 6 ...

All of which is just a long winded way of saying: There is something that you are not telling us going on here, and the quickest way of clarifying what that might be, is for you to show use the contents of the script you are using, rather than hypothetical equvalents which obviously aren't.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."

In reply to Re: Synchronizing Multiple System Processes by BrowserUk
in thread Synchronizing Multiple System Processes by neversaint

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.