Unfortunately there is no file locking in Unix.
What you can do is call a system command and use a combination of fuser and grep to find if some other process is using the file.
Unfortunately there is no file locking in Unix.
What you can do is call a system command and use a combination of fuser and grep to find if some other process is using the file.
Unix doesn't create any lock files. If an application doesn't lock the file for exclusive access (and on Unix applications rarely do that), there is no way of knowing if a file is open other than processing the /proc tree (if it exists and you have access to it).
Bookmarks