+UNRELEASED
+ * (bugfix) Exit code should be 2 when the hostname can't be resolved
+ (fixes #98, reported by @green-fox)
+
2015-10-21 David Schweikert <david@schweikert.ch>
* Version 3.13
* (bugfix) Fix ICMP errors sometimes causing crashes with fping >= 3.11
# fping
{
my $cmd = Test::Command->new(cmd => "fping nosuchname.example.com");
-$cmd->exit_is_num(1);
+$cmd->exit_is_num(2);
$cmd->stdout_is_eq("");
$cmd->stderr_like(qr{^nosuchname\.example\.com: .*not (known|found)});
}
# fping6
{
my $cmd = Test::Command->new(cmd => "fping6 nosuchname.example.com");
-$cmd->exit_is_num(1);
+$cmd->exit_is_num(2);
$cmd->stdout_is_eq("");
$cmd->stderr_like(qr{^nosuchname\.example\.com: .*not (known|found)});
}
usage(1);
}
- if( !num_hosts )
- exit(1);
+ if(!num_hosts) {
+ exit(num_noaddress ? 2 : 1);
+ }
if(src_addr_present) {
socket_set_src_addr(s, src_addr);