gnu@l5.uucp (John Gilmore) (12/30/85)
In article <830@brl-tgr.ARPA>, Hoffman.wbst@xerox.arpa writes: > I have two parallel processes (one a child of the other) and I need both > to have access to one linked list (essentially a queue). The scenario > is as follows: > --The parent process allocates and fills the first node. > --The parent process invokes the child process, and then, optionally, > continues building the list. > --The child process extracts the necessary information from the first > node and then removes that node from the head of the list, proceeding to > the next node. If there is no next node, the child process goes to sleep > until the parent process builds another linked list. > > After the child process is invoked, the parent process is only concerned > with the tail of the list while the child process is only concerned with > the head of the list. > > I think that the best way to give both processes access to the linked > list is by using shared memory... Unfortunately, I can't > quite figure out the shared memory utilities. Why not just create a pipe between the two processes and have the parent shove things down it to the child?