in reply to Forking Question

I've been doing some work with forking lately (see my posts if you want to know about perl/tk and forking and win32), and my initial thought after reading your question was to just open up pipes both ways (child to parent and parent to child) and then you can just have the child print a line back to the parent when it is done. Just format the line so it is easily split apart into the various parts of say a hash or array, etc.

For example you could print this back:

key1:element1,key2:element2 (and so on)

Then the only thing you have to figure out (from the IPC docs or wherever) is how to wait for this in a nice way in the parent (unless you don't mind polling...). The parent just has to split the line, and put it back together.

Admittedly, this is a hack. But sometimes its more fun to just get it working and move on to other cool parts of the program. ;)

Justin Eltoft

"If at all god's gaze upon us falls, its with a mischievous grin, look at him" -- Dave Matthews