From: Michał Kępień Date: Tue, 12 Mar 2019 07:42:48 +0000 (+0100) Subject: Silence a Perl warning output by stop.pl X-Git-Tag: v9.15.0~98^2 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=91e5a99b9b10e9cb6904f39a26c47e9dfd39693a;p=thirdparty%2Fbind9.git Silence a Perl warning output by stop.pl On Unix systems, the CYGWIN environment variable is not set at all when BIND system tests are run. If a named instance crashes on shutdown or otherwise fails to clean up its pidfile and the CYGWIN environment variable is not set, stop.pl will print an uninitialized value warning on standard error. Prevent this by using defined(). --- diff --git a/bin/tests/system/stop.pl b/bin/tests/system/stop.pl index 06ebf61a890..0a1358a275b 100644 --- a/bin/tests/system/stop.pl +++ b/bin/tests/system/stop.pl @@ -240,7 +240,7 @@ sub clean_pid_file { if (send_signal(0, $pid) == 0) { # XXX: on windows this is likely to result in a # false positive, so don't bother reporting the error. - if ($ENV{'CYGWIN'} eq "") { + if (!defined($ENV{'CYGWIN'})) { print "I:$test:$server crashed on shutdown\n"; $errors = 1; }