s. (If your System V Unix doesn’t support the POSIX-y <code>fcntl()</code>, you’ll have to reconcile the following information with your <code>lockf()</code> man page.)</p>
<h2 data-number="6.1" id="setting-a-lock"><span class="header-section-number">6.1</span> Setting a lock</h2>
<p>The <code>fcntl()</code> function does just about everything on the planet, but we’ll just use it for file locking. Setting the lock consists of filling out a <code>struct flock</code> (declared in <code>fcntl.h</code>) t