[LCP]abt IPC

Robert Elsner roberte at matchmaker.com
Thu Aug 30 00:26:04 UTC 2001


> It doesn't matter which one executes first in your
> program (and that is non-deterministic so it is good that it doesn't
> matter) because when the parent hits the read() on the pipe it will
> stop and wait until there is something to read or the other end of
> the pipe gets closed. Once the child has written something then the
> read() can continue.

And this deadlock also one of many solutions. One is the use of the
select() function, man 'select'.

I actually just learned how to do this recently. I have a webpage that sets
up bi-directional pipes to the program ispell, so that we can spellcheck
some data online. Really cool stuff.






More information about the linuxCprogramming mailing list