Skip Menu |

This queue is for tickets about the Mail-IMAPClient CPAN distribution.

Report information
The Basics
Id: 2630
Status: resolved
Priority: 0/
Queue: Mail-IMAPClient

People
Owner: DJKERNEN__NO_SOLICITING__ [...] cpan.org
Requestors: dannys [...] cinesite.co.uk
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



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
Thanks for your bug reports (and analyses!), Danny. I've updated the next version to a) set $ret to 0 if it is undef, and b) set $! to 0 before syswrites. -- Cheers, Dave K.