in reply to Re^2: IPC via named pipes, losing some messages
in thread IPC via named pipes, losing some messages
That said, does this work for you?
I haven't yet found out how to make the sysread call blocking, but if I do I'll let you know.open FH, "<pipe" or die "open failed; $!\n"; my $buf; while (1) { my $nr = sysread(FH, $buf, 1024, length($buf)); while ($buf =~ s/^(.*?)\n//) { process_line($1); } sleep(1); } close(FH);
|
|---|