srv = ap_poll(pollset, &n, -1);
if (srv != APR_SUCCESS) {
- if (errno == APR_EINTR) {
+ if (ap_canonical_error(srv) == APR_EINTR) {
continue;
}
requests_this_child = max_requests_per_child;
/* Set up the pollfd array */
- listenfds = ap_palloc(pchild, sizeof(*listenfds) * (num_listenfds + 1));
+ listenfds = ap_pcalloc(pchild, sizeof(*listenfds) * (num_listenfds + 1));
ap_put_os_sock(&listenfds[0], &pipe_of_death[0], pchild);
for (lr = ap_listeners, i = 1; i <= num_listenfds; lr = lr->next, ++i)
listenfds[i]=lr->sd;
ret = ap_poll(pollset, &n, -1);
if (ret != APR_SUCCESS) {
- if (ret == APR_EINTR) {
+ if (ap_canonical_error(ret) == APR_EINTR) {
continue;
}
requests_this_child = ap_max_requests_per_child;
/* Set up the pollfd array */
- listensocks = ap_palloc(pchild,
+ listensocks = ap_pcalloc(pchild,
sizeof(*listensocks) * (num_listensocks + 1));
- ap_create_tcp_socket(&listensocks[0], pchild);
ap_put_os_sock(&listensocks[0], &pipe_of_death[0], pchild);
for (lr = ap_listeners, i = 1; i <= num_listensocks; lr = lr->next, ++i)
listensocks[i]=lr->sd;