summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/IO/Pty/Easy.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/IO/Pty/Easy.pm b/lib/IO/Pty/Easy.pm
index 590b3ec..c566079 100644
--- a/lib/IO/Pty/Easy.pm
+++ b/lib/IO/Pty/Easy.pm
@@ -161,6 +161,8 @@ sub spawn {
my $errno;
my $read_bytes = sysread($readp, $errno, 256);
unless (defined $read_bytes) {
+ # XXX: should alarm here and follow up with SIGKILL if the process
+ # refuses to die
kill TERM => $self->{pid};
close $readp;
$self->_wait_for_inactive;