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.
In reply to Re: Synchronizing Multiple System Processes
by BrowserUk
in thread Synchronizing Multiple System Processes
by neversaint
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |