cks it. By running this program in two (or more) windows, you can see how programs interact while waiting for locks.</p>
<p>Basically, usage is this: if you run <code>lockdemo</code> with no command line arguments, it tries to grab a write lock (<code>F_WRLCK</code>) on its source (<code>lockdemo.c</code>). If you start it with any command line arguments at all, it tries to get a read lock (<code>F_RDLCK</code>) on it.</p>
<p><a href="https://beej.us/guide/bgipc/source/examples/lockdemo.c">Here’s the sour