Creating a working fork pool class


I am trying to create a fork pool class to help processing large amount
of data in parallel on multiple cores. I had a looking at existing
solutions like the gems fork, parallel, forkoff and forkmanager, but I
failed to get these to work the way I want - so I am rolling my own.
Unfortunately, it is not going very well. First of all, the code does
not appear to execute in parallel, and secondly, I foresee problems with
blocking of IPC IO for processing of large amounts of data. Here is what
I have written so far:

For some reason forking is complex even though this technique is vital.
So I need some pointers?