• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: getaddrinfo() returns EAI_NONAME
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: getaddrinfo() returns EAI_NONAME


  • Subject: Re: getaddrinfo() returns EAI_NONAME
  • From: Eli Bach <email@hidden>
  • Date: Fri, 28 Aug 2009 11:09:10 -0700


On Aug 28, 2009, at 10:07 AM, Satish Kilaru wrote:

HI All

I have a service that starts at boot time. Upon machine reboot my service starts up. But getaddrinfo() returns EAI_NONAME. If I kill the service and start It again from a login shell, getaddrinfo() works fine.

What could be the reason? Is it because my service is starting before some system service?


First, unless you are supporting older OS's (like 10.3), you should be using launchservices instead of a SystemStartup item


Second, yes, given your plist, most likely your daemon is loading before the network stack has loaded and configured. With a SystemStartupItem, you can add a dependency, so that your daemon loads after the network stack is loaded (but you may still not have a valid network connection).

With launchservices, you need to test yourself whether the network is available and then try to resolve the name. Or you could just retry the operation after a period of time.

Eli

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • RE: getaddrinfo() returns EAI_NONAME
      • From: Satish Kilaru <email@hidden>
    • RE: getaddrinfo() returns EAI_NONAME
      • From: Satish Kilaru <email@hidden>
References: 
 >getaddrinfo() returns EAI_NONAME (From: Satish Kilaru <email@hidden>)

  • Prev by Date: getaddrinfo() returns EAI_NONAME
  • Next by Date: RE: getaddrinfo() returns EAI_NONAME
  • Previous by thread: getaddrinfo() returns EAI_NONAME
  • Next by thread: RE: getaddrinfo() returns EAI_NONAME
  • Index(es):
    • Date
    • Thread