diff options
author | Jesse Luehrs <doy@tozt.net> | 2010-01-02 16:43:09 -0600 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2010-01-02 16:43:09 -0600 |
commit | b087734e8cb866baa6a1cf12b3daf23d9e0f1531 (patch) | |
tree | d1a63f4cbd61a96c31410d65c12873b74629a7c1 | |
parent | 097e4932076c9b9e3e42af1ddd0051f265f71f59 (diff) | |
download | io-pty-easy-b087734e8cb866baa6a1cf12b3daf23d9e0f1531.tar.gz io-pty-easy-b087734e8cb866baa6a1cf12b3daf23d9e0f1531.zip |
cleanups
-rw-r--r-- | lib/IO/Pty/Easy.pm | 9 |
1 files 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; |