x systems. System V likes <code>lockf()</code>, which, personally, I think sucks. Better systems support <code>flock()</code> which offers better control over the lock, but still lacks in certain ways. For portability and for completeness, I’ll be talking about how to lock files using <code>fcntl()</code>. I encourage you, though, to use one of the higher-level <code>flock()</code>-style functions if it suits your needs, but I want to portably demonstrate the full range of power you have at your fingertip