From 6b0de765461e3592e0fd2a88051eeadaac516158 Mon Sep 17 00:00:00 2001 From: doy Date: Tue, 3 Feb 2009 20:16:30 -0500 Subject: don't eat cpu while waiting for a process to die --- lib/IO/Pty/Easy.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/IO/Pty/Easy.pm b/lib/IO/Pty/Easy.pm index f3b1eec..b41258c 100644 --- a/lib/IO/Pty/Easy.pm +++ b/lib/IO/Pty/Easy.pm @@ -316,7 +316,7 @@ sub close { sub _wait_for_inactive { my $self = shift; - 1 while $self->is_active; + select(undef, undef, undef, 0.01) while $self->is_active; } # }}} -- cgit v1.2.3-54-g00ecf