Yes. Unix fcntl locks (and generally the file system resources in general) are system-wide, so any two execution threads (whether they are separate processes or not) can use them. Whether this is a good idea or not depends on the context.
source
share