From b087734e8cb866baa6a1cf12b3daf23d9e0f1531 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sat, 2 Jan 2010 16:43:09 -0600 Subject: cleanups --- lib/IO/Pty/Easy.pm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/IO/Pty/Easy.pm b/lib/IO/Pty/Easy.pm index e29f25b..2953f1d 100644 --- a/lib/IO/Pty/Easy.pm +++ b/lib/IO/Pty/Easy.pm @@ -139,11 +139,11 @@ sub spawn { # reopen the standard file descriptors in the child to point to the # pty rather than wherever they have been pointing during the script's # execution - open(STDIN, "<&" . $slave->fileno) + open(STDIN, '<&', $slave->fileno) or carp "Couldn't reopen STDIN for reading"; - open(STDOUT, ">&" . $slave->fileno) + open(STDOUT, '>&', $slave->fileno) or carp "Couldn't reopen STDOUT for writing"; - open(STDERR, ">&" . $slave->fileno) + open(STDERR, '>&', $slave->fileno) or carp "Couldn't reopen STDERR for writing"; close $slave; { exec(@_) }; @@ -305,7 +305,8 @@ sub kill { my ($sig, $non_blocking) = @_; $sig = "TERM" unless defined $sig; - my $kills = kill $sig => $self->pid if $self->is_active; + my $kills; + $kills = kill $sig => $self->pid if $self->is_active; $self->_wait_for_inactive unless $non_blocking; return $kills; -- cgit v1.2.3