Also, you must be aware that accessing a file by two or more processes while one or more of these processes does modifications opens the door to race conditions.
The most common symptom you're likely to see, particularly with large files and slow updates, is that you'll get truncated files.
Race conditions on filesystem resources are generally avoided by implementing a file locking scheme. Basically, your writer process needs to acquire a write lock and your checking / e-mailing process(es) needs a read lock. Be aware though that locking is a complex subject and it can get quite messy, and many things can go wrong. Google and Super Search are your friends.
In reply to Re: starting a script when a file appears in a directory
by calin
in thread starting a script when a file appears in a directory
by Mattk470
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |