in reply to process management
I thought about similar issue before some time, but from different perspective. If some process (or, more exactly, some family of processes) will do a job to create some files, it can write origfilename.$pid, and rename that file when finished. The reading process will read only files without $pid postfix. For entireness, the reading process or other process should check writing process defined by $pid for existence, identity and sanity - but implementation of checking depends on particular requirement...