I’m currently working on some C program, and I’d like to know if there’s any chance to block writing in the writer process (until the read is done) ? i.e. I have 3 pipes between the parent process and the children processes (the parent writes and the children read), I’d like to let the parent to write only to the process that finishes its reading 🙂
I hope it’s clear..
Thanks in advance.
bmargulies is correct. An alternative to creating a more complex protocol, however, would be to use multiple threads in the parent process — one thread per child process. One thread might block due to a slow child, but the other threads could continue with their children. Depending on the details of your problem, this might solve it.