Hi Marc,
As you suggested I'm using getaddrinfo with libeio for dns lookups.
I'm calling it through eio_custom but getting a SIGSEGV. The problem
appears to be related to the stacksize. When I remove the line
pthread_attr_setstacksize (&attr, PTHREAD_STACK_MIN < sizeof (long) * 4096
? sizeof (long) * 4096 : PTHREAD_STACK_MIN);
in xthread.h it works properly. I run Linux 2.6.24 and gcc version 4.2.4.
My eio_custom call is not fancy. Pasted below for reference.
static int
Resolve (eio_req *req)
{
Socket *socket = static_cast<Socket*> (req->data);
struct addrinfo *address = NULL;
printf("trying to resolve %s:%s \n", socket->host_, socket->port_);
req->result = getaddrinfo(socket->host_, socket->port_, &tcp_hints, &address);
req->ptr2 = address;
free(socket->host_);
socket->host_ = NULL;
free(socket->port_);
socket->port_ = NULL;
return 0;
}
...
eio_req *req = eio_custom (Resolve, EIO_PRI_DEFAULT,
Socket::AfterResolve, socket);
_______________________________________________
libev mailing list
[email protected]
http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev