From ac0ab6cec294d01edf2a0a162c58e1712fabaa8b Mon Sep 17 00:00:00 2001
From: Slaven Rezic <cpansand@prod4>
Date: Thu, 23 Mar 2017 06:34:49 +0000
Subject: [PATCH] 'openssl --help' -> 'openssl help', and skip END block if
 needed (RT #120701)

---
 t/10connect-openssl.t | 2 +-
 t/11listen-openssl.t  | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/t/10connect-openssl.t b/t/10connect-openssl.t
index 0363b12..7832898 100644
--- a/t/10connect-openssl.t
+++ b/t/10connect-openssl.t
@@ -13,7 +13,7 @@ use IO::Async::SSL;
 
 use POSIX qw( WEXITSTATUS );
 
-system( "openssl --help >/dev/null 2>&1" ) == 0 or
+system( "openssl help >/dev/null 2>&1" ) == 0 or
    plan skip_all => "no openssl";
 
 my $loop = IO::Async::Loop->new;
diff --git a/t/11listen-openssl.t b/t/11listen-openssl.t
index 9966e65..f7d03ce 100644
--- a/t/11listen-openssl.t
+++ b/t/11listen-openssl.t
@@ -14,7 +14,7 @@ use IO::Async::Listener;
 
 use POSIX qw( WEXITSTATUS );
 
-system( "openssl --help >/dev/null 2>&1" ) == 0 or
+system( "openssl help >/dev/null 2>&1" ) == 0 or
    plan skip_all => "no openssl";
 
 my $loop = IO::Async::Loop->new;
@@ -64,7 +64,7 @@ my $kid = $loop->spawn_child(
 close $ssl_rd;
 close $ssl_wr;
 
-END { kill 'TERM', $kid }
+END { kill 'TERM', $kid if defined $kid }
 
 my @openssl_lines;
 $loop->add( my $openssl_stream = IO::Async::Stream->new(
-- 
2.1.4