in reply to Re: Question about flock and printing to file
in thread Question about flock and printing to file

as if 2 forks could print to the fh, regardless of the lock on it
This is exactly how it works. Manpage:
Locks created by flock() are associated with an open file table entry. This means that duplicate file descriptors (created by, for example, fork(2) or dup(2)) refer to the same lock, and this lock may be modified or released using any of these descriptors... Subsequent flock() calls on an already locked file will convert an existing lock to the new lock mode.
If you don't understand this stuff - descriptors, file table entries - don't worry... the short answer is: yes, forks do that.
  • Comment on Re^2: Question about flock and printing to file