[FASTCGI] EAGAIN error in socket_send()[mod_fastcgi-2.4.6] call

Santosh Mankar mankar.san at gmail.com
Tue Sep 25 02:04:27 EDT 2012


Hi All,

I am using httpd-2.2.22/mod_fastcgi-2.4.6/fcgi-2.4.0 on Solaris10 OS.
some times I am getting EAGAIN error in socket_send() call present in
mod_fastcgi-2.4.6 and file name is fcgi_buf.c.

code for socket_send() function is as follows:

static int socket_send(int fd, char * buf, int len)
{
    int bytes_sent;
    do {
        bytes_sent = write(fd, buf, len);
        if (bytes_sent < 0)
        {
#ifdef EWOULDBLOCK
            ASSERT(errno != EWOULDBLOCK);
#endif
#ifdef EAGAIN
            ASSERT(errno != EAGAIN);
#endif
        }
    }
    while (bytes_sent == -1 && errno == EINTR);
    return bytes_sent;
}

I dont want to abort sending data if EAGAIN error pops up.
Can we handle EAGAIN/EWOULDBLOCK error and continue with the loop?
same case present for sock_recv() call also.

Thanks,
Santosh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.fastcgi.com/pipermail/fastcgi-developers/attachments/20120925/dedf1b28/attachment.html>


More information about the FastCGI-developers mailing list