Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Why did we have to call them “lock files?” There is an existing thing known as a lock file for actual file locking.

Call them literally anything else. Freeze file, version spec, dependency pin…

There really are only two hard problems in computer science, as the saying goes. Cache invalidation and epithet manufacturing (cough).



we should have called the other thing mutex files


Locks don't actually work in POSIX in real life anyway.


doesn't opening a file with O_CREAT|O_EXCL work in posix?


POSIX only guarantees advisory locks; mandatory locks are an optional feature and are not supported in Linux. See for example <https://stackoverflow.com/questions/77931997/linux-mandatory...>.


But that is file locking, not lockfiles...

Creating a file with the exclusive creation mode is a pretty common way to make a lock file and as far as I know that works well in posix.


Python is following the precedent of many other "language ecosystems" here.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: