gethostbyname

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux