Date: | Thu, 22 May 2003 14:33:24 +0100 |
From: | Danny Smith <dannys [...] cinesite.co.uk> |
To: | bug-Mail-IMAPClient [...] rt.cpan.org |
Subject: | IMAPClient EAGAIN bug. |
There's a problem with the _send_line function, it would seem.
The syswrite() at line 1449 can (and, on my system, running Linux 2.4.20
client to a Cyrus server, does) give an EAGAIN error. However, when it
does, the return value is "undef" according to the manpage (and in
practice).
Later (lines 1477+), the return value ($ret) is used in the optimization
section (which is only called if we get an EAGAIN error it seems, and
hence have no return value).
Not quite sure what the corect behaviour here would be - select()ing
would be good, but not sure of the right way to determine the timeout.
For now I'm working around it by setting ret to zero at the beginning of
the optimize block when $ret is undef.
On another related note, immediately after the syswrite() $! is not
guaranteed to be set to a useful value unless "undef" is returned.
Hope that helps,
Danny
--
Danny Smith
Senior Systems Administrator, Cinesite (Europe) Ltd
020 7973 4000 - x4055 / dannys@cinesite.co.uk