Re: gethostid problem
Re: gethostid problem
- Subject: Re: gethostid problem
- From: "Quinn \"The Eskimo!\"" <email@hidden>
- Date: Thu, 17 Feb 2011 12:27:06 +0000
On 16 Feb 2011, at 20:07, Stan Sieler wrote:
> It's a quick/cheap/easy and (mostly) portable method of getting something we can use for software licensing.
OK. IIRC it was traditional for BSD systems to return the hosts IP address for the host ID, but those days are long gone.
> Of course, the man page for it has this troublesome "wait" parameter ... why should a process
> have to wait to get the UUID for the host?
Because the UUID may come from (or be derived in part from data that comes from) the I/O Registry, and I/O Registry probing happens asynchronously at system startup. So if you're running at early boot time, the UUID may not be available at the point you ask for it, meaning that you might end up waiting a while (in terms of CPU cycles). Or, if you're a process that is involved in booting the system, you might end up deadlocking the system.
Application level code should always wait. If you're feeling paranoid use a long wait and then fail to startup if you get an error. Personally, for an application, I'd just wait indefinitely.
S+E
--
Quinn "The Eskimo!" <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Filesystem-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden