Problem:
--------

I have a launchd daemon that performs DNS requests using getaddrinfo to 
retrieve the IP(s) for a series of hosts' names.

• On Yosemite:

The requests all fail (EAI_NONAME) when they are run just after the daemon has 
been launched. They also fail 1 minute later. They again fail 1 minute later. 
And they again fail 1 minute later.

Killing the process via Activity Monitor (*) automatically restarts the daemon 
as expected.

And then the requests that should succeed do succeed on the first attempt.

Also if you were to perform a nslookup (from the Terminal) query during that 
time with the same hosts' names, it would work fine.


• On Mountain Lion:

The requests that should succeed do succeed. At least on the computer I used.

Discussion:
-----------

I could understand that just after boot time the DNS APIs would not be ready. I 
can not understand why they still do not work 3 minutes after startup time.

Question:
---------

What could prevent the getaddrinfo from working? Could it be some mach 
bootstrap context issue?



According to the doc, this API is supposed to be thread safe. A hostname is 
correctly provided, a hints structure is provided (using NULL does not solve 
the issue).



(*) I'm wondering whether it's the designed behavior of Activity Monitor that 
you can force kill a root process without having to enter your admin password.



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/macnetworkprog/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to