r gets the lock. See, the second argument (the <code>cmd</code>) to <code>fcntl()</code> tells it what to do with the data passed to it in the <code>struct flock</code>. The following list summarizes what each <code>fcntl()</code> <code>cmd</code> does:</p>
<p>|<code>cmd</code>|Description| |<code>F_SETLKW</code>|This argument tells <code>fcntl()</code> to attempt to obtain the lock requested in the <code>struct flock</code> structure. If the lock cannot be obtained (since someone else has it locked already