summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2010-11-03 00:01:34 -0500
committerJesse Luehrs <doy@tozt.net>2010-11-03 00:07:59 -0500
commit79d548629691e78a23e3873f16c729e3c60cebaf (patch)
tree42c0fba850c4863c33b9c48af668920aab6d3a49
parentfb4779c4da49301f8e85dcb72744de58b4f765e5 (diff)
downloadapp-termcast-79d548629691e78a23e3873f16c729e3c60cebaf.tar.gz
app-termcast-79d548629691e78a23e3873f16c729e3c60cebaf.zip
don't treat interrupted system calls as actual errors
-rw-r--r--lib/App/Termcast.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/App/Termcast.pm b/lib/App/Termcast.pm
index 1a11b07..6fd6b4d 100644
--- a/lib/App/Termcast.pm
+++ b/lib/App/Termcast.pm
@@ -253,7 +253,8 @@ sub run {
while (1) {
my ($rin, $win, $ein) = $self->_build_select_args;
my ($rout, $wout, $eout);
- select($rout = $rin, undef, $eout = $ein, undef);
+ my $select_res = select($rout = $rin, undef, $eout = $ein, undef);
+ redo if $select_res == -1 && ($!{EAGAIN} || $!{EINTR});
if ($self->_socket_ready($eout)) {
$self->clear_socket;