diff options
author | doy <doy@tozt.net> | 2009-02-03 20:16:30 -0500 |
---|---|---|
committer | doy <doy@tozt.net> | 2009-02-03 20:16:30 -0500 |
commit | 6b0de765461e3592e0fd2a88051eeadaac516158 (patch) | |
tree | 14679eb94472f342bd1872aa49a493a6e46e75c9 | |
parent | ecc0917407bff3bd000a7de92ebbc311221a3258 (diff) | |
download | io-pty-easy-6b0de765461e3592e0fd2a88051eeadaac516158.tar.gz io-pty-easy-6b0de765461e3592e0fd2a88051eeadaac516158.zip |
don't eat cpu while waiting for a process to die
-rw-r--r-- | lib/IO/Pty/Easy.pm | 2 |
1 files changed, 1 insertions, 1 deletions
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; } # }}} |