I have written a package in Tcl to log data to a file. This package creates one file per day and the users can log data to this file. Many users will eventually start using the pacakage and might write to the file at the same time. Is there a way in Tcl to do file locking so that only one particular user can write to the file at a time.