Tangential. A file lock is released if the locking process exits. This can be leveraged to make a poor man's semaphore that is automatically raised if the process exits. Slow but solid if you want to control the number of simultaneous crash prone processes that have access to a resource.