bootstrap_status_t serviceactive;
mach_timebase_info_data_t info;
(void)mach_timebase_info(&info);
uint64_t poll_interval = 1000000000ULL * info.denom / info.numer; //
1 second
uint32_t i = 0;
do {
while (bootstrap_status(bootstrap_port, servicename[i],
&serviceactive) == BOOTSTRAP_UNKNOWN_SERVICE && ! serviceactive) {
mach_wait_until(poll_interval + mach_absolute_time());
}
} while (++i < sizeof(servicename) / sizeof(servicename[0]));
For many different reasons, I would not recommend the above strategy.
If you must workaround OS bugs, I'd much rather advise putting a
blatant sleep(10) at the top of your main().
Please, please file bugs. Thanks! :-)
davez
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/darwin-dev/email@hidden