Hi, gethostbyname just takes too long once in a while on certain sites... is there a way to set a time out for gethostbyname? I tried this: act.sa_flags = SA_NOMASK; act.sa_handler = connect_timeout; sigaction(SIGALRM, &act, NULL); alarm(DNS_TIMEOUT); hostentry = gethostbyname(host); alarm(0); but when the alarm happened, I got a SIGSEGV in gethostbyname Thanks Lee __________________________________________________ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/ - : send the line "unsubscribe linux-net" in the body of a message to majordomo@vger.kernel.org