Although not generally recommended, you can do interprocess locking without using the threads library. If this is something you want to do, see the instructions in Using LWPs Between Processes.