How would I even go about forking a child process using Haskell in the first place?
Also, if pipes are an obvious solution to the data sharing question – is there any other way to do it besides using pipes? I’m familiar with the use of shared memory segments in C (the shmget, *shmat, shmdt and shmctl functions). Could Haskell be able to imitate this? If so, how?
I’d be very grateful for any help you could spare.
I must admit I’m very much new to functional programming languages, even more so when it comes to Haskell. So forgive me (and please correct me) if I said something silly.
Better yet, use Software Transactional Memory – that is, TVars and TChannels.
Will recommend the same book, different chapter: http://book.realworldhaskell.org/read/software-transactional-memory.html
Here is a good small example of this technique in action: http://sequence.complete.org/node/257