in reply to IPC via named pipes, losing some messages
I would open the pipe outside the while loop. When you using buffered I/O (ala <FH>) you can read more than one line from the pipe even though only one line is returned by <FH>. The rest is buffered by perl, but since you are closing the pipe right away it essentially is discarded. This could account for why the server is not logging all of its reads.while (1) { ... open FH, "<pipe"; my $data = <FH>; close FH ... }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: IPC via named pipes, losing some messages
by ftumsh (Scribe) on Apr 14, 2008 at 08:42 UTC | |
by pc88mxer (Vicar) on Apr 14, 2008 at 15:37 UTC |