You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Randy Terbush <ra...@zyzzyva.com> on 1997/01/26 21:32:22 UTC
Hold the Presses! Possible problem in 1.2b5
I've found that the changes in the patch submitted by Roy which
changed the loop in child_main() around the accept fails to
serve a request on my FreeBSD 2.1.6 server.
However, it seems to work fine on a FreeBSD 2.2 machine.
[Sun Jan 26 14:19:21 1997] accept: (client socket): Undefined error: 0
Looks like this is the code in question. Reversing that patch solves
the problem.
do {
clen = sizeof(sa_client);
csd = accept(sd, &sa_client, &clen);
} while (csd < 0 && errno == EINTR);
if (csd < 0) break;
log_unixerr("accept", "(client socket)", NULL, server_conf);
Re: Hold the Presses! Possible problem in 1.2b5
Posted by Marc Slemko <ma...@znep.com>.
I think the following should fix it.
BTW, Apache won't compile with HAVE_SNPRINTF defined as things are now
because not everything includes conf.h. Probably not worth worrying about
for this beta? Or is it.
Index: http_main.c
===================================================================
RCS file: /export/home/cvs/apache/src/http_main.c,v
retrieving revision 1.113
diff -c -r1.113 http_main.c
*** 1.113 1997/01/25 22:37:11
--- http_main.c 1997/01/26 20:38:49
***************
*** 1607,1613 ****
clen = sizeof(sa_client);
csd = accept(sd, &sa_client, &clen);
} while (csd < 0 && errno == EINTR);
! if (csd < 0) break;
log_unixerr("accept", "(client socket)", NULL, server_conf);
}
}
--- 1607,1613 ----
clen = sizeof(sa_client);
csd = accept(sd, &sa_client, &clen);
} while (csd < 0 && errno == EINTR);
! if (csd > 0) break;
log_unixerr("accept", "(client socket)", NULL, server_conf);
}
}
On Sun, 26 Jan 1997, Randy Terbush wrote:
>
> I've found that the changes in the patch submitted by Roy which
> changed the loop in child_main() around the accept fails to
> serve a request on my FreeBSD 2.1.6 server.
>
> However, it seems to work fine on a FreeBSD 2.2 machine.
>
> [Sun Jan 26 14:19:21 1997] accept: (client socket): Undefined error: 0
>
> Looks like this is the code in question. Reversing that patch solves
> the problem.
>
> do {
> clen = sizeof(sa_client);
> csd = accept(sd, &sa_client, &clen);
> } while (csd < 0 && errno == EINTR);
> if (csd < 0) break;
> log_unixerr("accept", "(client socket)", NULL, server_conf);
>