From fbf6a3eb40f85504a6e5a95e5ce9e687bf505e29 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sat, 25 Feb 2012 17:36:32 -0600 Subject: why was i even handling winch specially to begin with --- lib/Select/Retry.pm | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/lib/Select/Retry.pm b/lib/Select/Retry.pm index 2cbcf1b..4ef1ba3 100644 --- a/lib/Select/Retry.pm +++ b/lib/Select/Retry.pm @@ -13,13 +13,6 @@ sub retry_select { : { mode => 'r' }); my (@handles) = @_; - my $got_winch; - my $old_winch = $SIG{WINCH}; - local $SIG{WINCH} = sub { - $got_winch = 1; - $old_winch->() if ref($old_winch) && ref($old_winch) eq 'CODE'; - }; - my ($out, $eout); my ($in, $ein) = (_build_select_vec(@handles)) x 2; my $res; @@ -31,11 +24,14 @@ sub retry_select { } my $again = $!{EAGAIN} || $!{EINTR}; - if (($res == -1 && $again) || $got_winch) { - return retry_select(@_); - } - elsif ($res == -1) { - Carp::croak("select failed: $!"); + if ($res == -1) { + if ($again) { + warn "retrying..."; + return retry_select(@_); + } + else { + Carp::croak("select failed: $!"); + } } return ($out, $eout); -- cgit v1.2.3-54-g00ecf