in reply to Pipes: Is it possible for a child to just read one line?

<FH> and read are buffered reads. sysread doesn't buffer, but you'll probably have to read it a byte at a time to avoid reading too much. ( I'm concerned with the possibility of two children reading from the pipe at the same time. )

Replies are listed 'Best First'.
Re^2: Pipes: Is it possible for a child to just read one line?
by Argel (Prior) on Oct 18, 2006 at 22:44 UTC
    Thanks! I think you are right -- I noticed that when I put the sleep in child() that more than one child process was reading the same line.
Re^2: Pipes: Is it possible for a child to just read one line?
by Argel (Prior) on Oct 19, 2006 at 20:59 UTC
    Your concerns about more than one child reading from the pipe at the same time made things click for my co-worker. Once he read that he switched to using message queues which turned out to be simpler and easier to read. Thanks for the help!!!