From 531953d43faca2ed99b3ef9a570b5fe66893d90b Mon Sep 17 00:00:00 2001 From: doy Date: Tue, 3 Feb 2009 03:34:15 -0500 Subject: don't fail on multiple close calls --- lib/IO/Pty/Easy.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/IO/Pty/Easy.pm b/lib/IO/Pty/Easy.pm index 7df04e3..ae0201a 100644 --- a/lib/IO/Pty/Easy.pm +++ b/lib/IO/Pty/Easy.pm @@ -300,6 +300,7 @@ Kills any subprocesses and closes the pty. No other operations are valid after t sub close { my $self = shift; + return unless defined $self->{pty}; $self->kill; close $self->{pty}; $self->{pty} = undef; -- cgit v1.2.3-54-g00ecf