diff options
author | doy <doy@tozt.net> | 2009-02-03 03:34:15 -0500 |
---|---|---|
committer | doy <doy@tozt.net> | 2009-02-03 03:34:15 -0500 |
commit | 531953d43faca2ed99b3ef9a570b5fe66893d90b (patch) | |
tree | 59bbe89c97240dcfb98f8af780d404d423dc2359 /lib | |
parent | 1702788b834945ac554e10bc903ec40bdb429b47 (diff) | |
download | io-pty-easy-531953d43faca2ed99b3ef9a570b5fe66893d90b.tar.gz io-pty-easy-531953d43faca2ed99b3ef9a570b5fe66893d90b.zip |
don't fail on multiple close calls
Diffstat (limited to 'lib')
-rw-r--r-- | lib/IO/Pty/Easy.pm | 1 |
1 files changed, 1 insertions, 0 deletions
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; |