I am working on an eCos project and I have a big problem. For some reason getaddrinfo and gethostbyname seem to hang the whole system from time to time in the production environment.
I have read that this is also an issue in linux if the DNS does not answer. To remedy the problem in Linux there is another function created called getaddrinfo_a.
Now I am looking for a failsafe solution to do DNS lookups in eCos, at least I don't want to hang the whole system. Is there any or do I need to be 100% sure that my DNS will deliver ip addresses and if not I will end up with a hanged system?
I have thought about making my own DNS implementation but that feels a bit too drastic. I have also thought about using some external library, but in that case I need one that works with eCos and that have a license I can use in a commercial project.