[CentOS] Lock files in scripts
Kenneth Porter
shiva at sewingwitch.comWed Jul 13 18:49:15 UTC 2011
- Previous message: [CentOS] Lock files in scripts
- Next message: [CentOS] use of MAILTO variable in crontab
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
--On Wednesday, July 13, 2011 12:35 PM -0600 Devin Reade <gdr at gno.org> wrote: > However, although I like the trap mechanism for dealing with cleaning > up temporary files (especially those files or directories containing > temporary files created by mktemp(1)), I don't think that it's the > right tool for lock files. Instead, have a look at flock(1) to avoid > the race conditions. (See flock(2) about its unsuitability for locks > on NFS filesystems, though.) Thanks, that looks much better. <http://linux.die.net/man/1/flock> I'm running my script as a normal user so the lock will be in the user's home directory.
- Previous message: [CentOS] Lock files in scripts
- Next message: [CentOS] use of MAILTO variable in crontab
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the CentOS mailing list