Event::File and Pipe
[email protected] (Alexandre Dulaunoy) Mon, 26 Nov 2001 10:58:17 +0100 (CET)
| Newsgroups | perl.loop |
|---|---|
| Message-ID | <[email protected]> |
Dear All,
I'm using Event::File->Tail to read a pipe. After a long times (10days for
example), the Event::File sometimes stops reading the pipe. Is it a known
issue ?
Here it is the example in use :
Event::File->tail(
cb => sub {
my ( $me, $line ) = @_;
##print "Got: $line\n"; ## Dis is for debug
&ipfc_call_log("Event react for syslog with : $line");
@ipfc_data[$cpt] = $line;
$cpt++;
},
file => '/opt/ipfc/dev/syslog',
endfile_cb => sub {
print "end of file.\n";
},
timeout => 20,
timeout_cb => sub {
my $watcher = shift;
print "an timeout happened. ID: " . $watcher->id . "\n";
print "Unlooping\n";
$watcher->unloop(10);
}
);
Thanks.
alx
--
Alexandre Dulaunoy [email protected]
http://www.conostix.com/