in reply to fork() interferring with backtick
why would the fork() interfere with the results from the backticks in line 8?It probably doesn't, it's too late for that (you already have the ouput of your system call by the time fork is called). What do you call "not working"? Do you have an error displayed, does your program skip certain files?
If the issue is that your list is not processed in the right order, then it's because you can't predict the order in which processes will be run. And if you're going to wait for one iteration of the loop to be over before doing the next, then fork is of no use.
If the order really is not important, then your processes are probably trying to access the same resource at the same time.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: fork() interferring with backtick
by mkaiser67 (Initiate) on Oct 16, 2013 at 18:30 UTC | |
by vsespb (Chaplain) on Oct 16, 2013 at 19:19 UTC |
In Section
Seekers of Perl Wisdom