Wrap parent writes to child socket and initial child reads of the
socket in file lock (via flock()) to prevent rare race condition
where child process reads to the end of the data before the parent
has written all bytes.
This create a new lock file on the system, which resides in the same
directory as the pid files. The lock file is created and destroyed by
the opensrf perl mods at service start up and shutdown.
See also https://bugs.launchpad.net/opensrf/+bug/883155
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Dan Scott <dscott@laurentian.ca>