|Pathologically Eclectic Rubbish Lister|
Regulating write access to pipes using semaphoresby girishatreya2005 (Novice)
|on Jul 26, 2010 at 14:08 UTC||Need Help??|
girishatreya2005 has asked for the
wisdom of the Perl Monks concerning the following question:
Hi Wise ones,
I have created a pipe to establish communication between a parent and multiple children it has forked.
In this scenario only the children would be doing the writes while the parent will just do the reads.
To serialize the writes to the pipe, I've used a semaphore. To do the reads from the pipe I've not specified any locking on the pipe.
But the reads/writes dont seem to be happening as planned. Please let me know what I've missed. I've included the sample code.