debian9 fix as it is bugged and always exits 1

This commit is contained in:
Zane C. B-H 2019-08-09 07:04:24 -05:00
parent 51cd8ea0d8
commit 34a865e864
2 changed files with 16 additions and 4 deletions

View File

@ -15,11 +15,11 @@ Net::Connection::lsof - This uses lsof to generate a array of Net::Connection ob
=head1 VERSION
Version 0.0.2
Version 0.0.3
=cut
our $VERSION = '0.0.2';
our $VERSION = '0.0.3';
=head1 SYNOPSIS
@ -90,7 +90,13 @@ sub lsof_to_nc_objects{
}
my $output_raw=`lsof -i UDP -i TCP -n -l -P`;
if ( $? ne 0 ){
if (
( $? ne 0 ) ||
(
( $^O =~ /linux/ ) &&
( $? eq 256 )
)
){
die('"lsof -i UDP -i TCP -n -l -P" exited with a non-zero value');
}
my @output_lines=split(/\n/, $output_raw);

View File

@ -12,7 +12,13 @@ BEGIN {
my $output_raw=`lsof -i UDP -i TCP -n -l -P`;
if ( $? eq 0 ){
if (
( $? eq 0 ) ||
(
( $^O =~ /linux/ ) &&
( $? eq 256 )
)
){
$extra_tests++;
my $worked=0;
eval{