Ok, maybe, although it's hard to tell if this true for all Unixes.
But what about EAGAIN then? Seems, after successful select(), read() can still return EAGAIN.
http://www.linuxmisc.com/9-unix-programmer/8c2366becf0f7d99.htm
http://stackoverflow.com/questions/13539066/can-write-to-a-non-blocking-fd-return-eagain-when-select-reports-it-as-writabl
http://code.google.com/p/picocom/issues/detail?id=13
And in this case seems you just close socket?
my $read = sysread($out, $bout, 20480, $offset);
if ($debug and $debug & 64) {
_debug "stdout, bytes read: ", $read, " at offset $offset";
$read and $debug & 128 and _hexdump substr $bout, $offset;
}
unless ($read) {
close $out;
On Sun Jul 14 19:51:08 2013, sfandino@yahoo.com wrote:
Show quoted text>
>
>
>
> ----- Original Message -----
> > From: Victor Efimov via RT <bug-Net-OpenSSH@rt.cpan.org>
> > To:
> > Cc:
> > Sent: Friday, July 12, 2013 10:25 PM
> > Subject: [rt.cpan.org #86901] sysread/write not protected from EINTR
> >
> > Fri Jul 12 16:25:30 2013: Request 86901 was acted upon.
> > Transaction: Ticket created by vsespb
> > Queue: Net-OpenSSH
> > Subject: sysread/write not protected from EINTR
> > Broken in: (no value)
> > Severity: (no value)
> > Owner: Nobody
> > Requestors: victor@vsespb.ru
> > Status: new
> > Ticket <URL:
https://rt.cpan.org/Ticket/Display.html?id=86901 >
> >
> >
> > I see sysread/syswrite in code, but I don't see protection from
> EINTR
>
> They operate on a non-blocking socket. AFAIK, non-blocking operations
> never return EINTR.
>