in reply to Receiving data from many children
You can open a pipe before you start spawning the children. Each child closes the read side of the pipe, and prints data to the write side. The parent reads from the pipe, which has become shared among the kids by duplication of the handle.
I published a similar example here at Many-to-One pipe. There, however, I had one child collecting the data from the others. You can adapt that to your requirements.
After Compline,
Zaxo
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Receiving data from many children
by xiper (Friar) on Aug 20, 2003 at 04:21 UTC |