mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-10-26 00:08:30 -04:00
select returns EINTR when HUP'd. This is not fatal. Handling this gracefully reduces log spam
This commit is contained in:
1 parent
0d71b18097
commit
271dcbc4e8
1 file changed
+5
-2
@@ -27,7 +27,7 @@ use strict;
|
||||
use ZoneMinder;
|
||||
use Getopt::Long;
|
||||
use autouse 'Pod::Usage'=>qw(pod2usage);
|
||||
use POSIX qw/strftime EPIPE/;
|
||||
use POSIX qw/strftime EPIPE EINTR/;
|
||||
use Socket;
|
||||
use Data::Dumper;
|
||||
use Module::Load::Conditional qw{can_load};
|
||||
@@ -191,7 +191,10 @@ if ( $options{command} ) {
|
||||
Fatal('Bogus descriptor');
|
||||
}
|
||||
} elsif ( $nfound < 0 ) {
|
||||
if ( $! == EPIPE ) {
|
||||
if ( $! == EINTR ) {
|
||||
# Likely just SIGHUP
|
||||
Debug("Can't select: $!");
|
||||
} elsif ( $! == EPIPE ) {
|
||||
Error("Can't select: $!");
|
||||
} else {
|
||||
Fatal("Can't select: $!");
|
||||
|
||||
Reference in new issue
Block a user