select returns EINTR when HUP'd. This is not fatal. Handling this gracefully reduces log spam
This commit is contained in:
parent
0d71b18097
commit
271dcbc4e8
|
@ -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: $!");
|
||||
|
|
Loading…
Reference in New Issue