http://qs1969.pair.com?node_id=716983


in reply to Waiting for a file to be written

I'm pretty sure that the problem isn't that my_file.txt isn't fully written when you call system, but rather that it's modified by the next iteration of the parent script before the child script reads it fully.

The solution is to either use locking, or not to spawn the child script in the background.

(If you want to learn more about locking Super Search for it, we had many discussion about that).