Subject: | Broken symlinks produce exception in KQueue backend |
Date: | Tue, 16 Jun 2015 17:47:03 -0700 |
To: | bug-AnyEvent-Filesys-Notify [...] rt.cpan.org |
From: | Dave Hayes <dave [...] jetcafe.org> |
In the KQueue backend, there's this code:
sub _watch {
my ( $self, $path ) = @_;
open my $fh, '<', $path or do {
warn
"KQueue requires a filehandle for each watched file and
directory.\n"
. "You have exceeded the number of filehandles permitted by
the OS.\n"
if $! =~ /^Too many open files/;
croak "Can't open file ($path): $!";
};
...
Note that if $path points to a broken symlink this will die. I'm not
sure what the use case is where you'd want that. Is it possible to make
an option to have ENOENT fail more gracefully (maybe print a warning
instead)?
Thanks in advance.
--
Dave Hayes - Consultant - Altadena CA, USA - dave@jetcafe.org
Show quoted text
>>>> *The opinions expressed above are entirely my own* <<<<
By and large, language is a tool for concealing the truth.
-George Carlin