- my $buf;
- while (my @fds = $recv_cmd->($self->{sock}, $buf, 4096)) {
- if (scalar(@fds) == 1 && !defined($fds[0])) {
- return if $! == EAGAIN;
- next if $! == EINTR;
- last if $! == ECONNRESET;
- die "recvmsg: $!";
- }
- for (@fds) { open my $rfh, '+<&=', $_ }
+ my @fds = $recv_cmd->($self->{sock}, my $buf, 4096);
+ if (scalar(@fds) == 1 && !defined($fds[0])) {
+ return if $! == EAGAIN;
+ die "recvmsg: $!" if $! != ECONNRESET;
+ @fds = (); # for open loop below: