Index: /trunk/src/VBox/Frontends/VBoxManage/VBoxManageGuestProp.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxManage/VBoxManageGuestProp.cpp	(revision 22689)
+++ /trunk/src/VBox/Frontends/VBoxManage/VBoxManageGuestProp.cpp	(revision 22690)
@@ -47,4 +47,8 @@
 #endif
 
+#ifdef RT_OS_DARWIN
+# include <CoreFoundation/CFRunLoop.h>
+#endif
+
 using namespace com;
 
@@ -165,4 +169,5 @@
                                      IN_BSTR flags)
     {
+RTPrintf("OnGuestPropertyChange:\n");
         Utf8Str utf8Name(name);
         Guid uuid(machineId);
@@ -482,7 +487,7 @@
 
 #ifdef USE_XPCOM_QUEUE
-    int const       fdQueue      = a->eventQ->GetEventQueueSelectFD();
-#endif
-    uint64_t const  StartMilliTS = RTTimeMilliTS();
+    int const       fdQueue   = a->eventQ->GetEventQueueSelectFD();
+#endif
+    uint64_t const  StartMsTS = RTTimeMilliTS();
     for (;;)
     {
@@ -502,5 +507,5 @@
         else
         {
-            uint64_t cMsElapsed = RTTimeMilliTS() - StartMilliTS;
+            uint64_t cMsElapsed = RTTimeMilliTS() - StartMsTS;
             if (cMsElapsed >= cMsTimeout)
                 break; /* timeout */
@@ -509,4 +514,5 @@
 
         /* Wait in a platform specific manner. */
+#define POLL_MS_INTERVAL    1000
 #ifdef USE_XPCOM_QUEUE
         fd_set fdset;
@@ -515,7 +521,7 @@
         struct timeval tv;
         if (    cMsLeft == RT_INDEFINITE_WAIT
-            ||  cMsLeft >= 1000)
-        {
-            tv.tv_sec = 1;
+            ||  cMsLeft >= POLL_MS_INTERVAL)
+        {
+            tv.tv_sec = POLL_MS_INTERVAL / 1000;
             tv.tv_usec = 0;
         }
@@ -531,7 +537,20 @@
             break;
         }
+
+#elif defined(RT_OS_DARWIN)
+        CFTimeInterval rdTimeout = (double)RT_MIN(cMsLeft, POLL_MS_INTERVAL) / 1000;
+        OSStatus orc = CFRunLoopRunInMode(kCFRunLoopDefaultMode, rdTimeout, true /*returnAfterSourceHandled*/);
+        if (orc == kCFRunLoopRunHandledSource)
+            orc = CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0.0, false /*returnAfterSourceHandled*/);
+        if (   orc != 0
+            && orc != kCFRunLoopRunHandledSource
+            && orc != kCFRunLoopRunTimedOut)
+        {
+            RTPrintf("Error waiting for event: %d\n", orc);
+            break;
+        }
+
 #else  /* !USE_XPCOM_QUEUE */
-/** @todo make this faster on Mac OS X (and possible Windows+OS/2 too), we should probably use WaitNextEvent() to wait here. */
-        int vrc = cbImpl->wait(RT_MIN(cMsLeft, 1000));
+        int vrc = cbImpl->wait(RT_MIN(cMsLeft, POLL_MS_INTERVAL));
         if (    vrc != VERR_TIMEOUT
             &&  RT_FAILURE(vrc))
