Index: /trunk/include/VBox/VBoxGuestLib.h
===================================================================
--- /trunk/include/VBox/VBoxGuestLib.h	(revision 54009)
+++ /trunk/include/VBox/VBoxGuestLib.h	(revision 54010)
@@ -432,5 +432,5 @@
 VBGLR3DECL(int)     VbglR3WriteLog(const char *pch, size_t cch);
 VBGLR3DECL(int)     VbglR3CtlFilterMask(uint32_t fOr, uint32_t fNot);
-VBGLR3DECL(int)     VbglR3Daemonize(bool fNoChDir, bool fNoClose, bool fRespawn);
+VBGLR3DECL(int)     VbglR3Daemonize(bool fNoChDir, bool fNoClose, bool fRespawn, unsigned *pcRespawn);
 VBGLR3DECL(int)     VbglR3PidFile(const char *pszPath, PRTFILE phFile);
 VBGLR3DECL(void)    VbglR3ClosePidFile(const char *pszPath, RTFILE hFile);
Index: /trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibDaemonize.cpp
===================================================================
--- /trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibDaemonize.cpp	(revision 54009)
+++ /trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibDaemonize.cpp	(revision 54010)
@@ -69,4 +69,6 @@
  * @param   fRespawn    Restart the daemonised process after five seconds if it
  *                      terminates abnormally.
+ * @param   pcRespawn   Where to store a count of how often we have respawned,
+ *                      intended for avoiding error spamming.  Optional.
  *
  * @todo    Use RTProcDaemonize instead of this.
@@ -75,5 +77,5 @@
  *          actually needs that.
  */
-VBGLR3DECL(int) VbglR3Daemonize(bool fNoChDir, bool fNoClose, bool fRespawn)
+VBGLR3DECL(int) VbglR3Daemonize(bool fNoChDir, bool fNoClose, bool fRespawn, unsigned *pcRespawn)
 {
 #if defined(RT_OS_OS2)
@@ -219,11 +221,15 @@
 
     if (fRespawn)
+    {
         /* We implement re-spawning as a third fork(), with the parent process
          * monitoring the child and re-starting it after a delay if it exits
          * abnormally. */
+        unsigned cRespawn = 0;
         for (;;)
         {
             int iStatus, rcWait;
 
+            if (pcRespawn != NULL)
+                *pcRespawn = cRespawn;
             pid = fork();
             if (pid == -1)
@@ -239,5 +245,7 @@
                 exit(0);
             sleep(5);
+            ++cRespawn;
         }
+    }
     return VINF_SUCCESS;
 #endif
Index: /trunk/src/VBox/Additions/common/VBoxService/VBoxService.cpp
===================================================================
--- /trunk/src/VBox/Additions/common/VBoxService/VBoxService.cpp	(revision 54009)
+++ /trunk/src/VBox/Additions/common/VBoxService/VBoxService.cpp	(revision 54010)
@@ -1099,5 +1099,5 @@
         VBoxServiceVerbose(1, "Daemonizing...\n");
         rc = VbglR3Daemonize(false /* fNoChDir */, false /* fNoClose */,
-                             false /* fRespawn */);
+                             false /* fRespawn */, NULL /* pcRespawn */);
         if (RT_FAILURE(rc))
             return VBoxServiceError("Daemon failed: %Rrc\n", rc);
Index: /trunk/src/VBox/Additions/x11/VBoxClient/main.cpp
===================================================================
--- /trunk/src/VBox/Additions/x11/VBoxClient/main.cpp	(revision 54009)
+++ /trunk/src/VBox/Additions/x11/VBoxClient/main.cpp	(revision 54010)
@@ -371,5 +371,5 @@
         VBClFatalError(("Creating pid-file path: %Rrc\n", rc));
     if (fDaemonise)
-        rc = VbglR3Daemonize(false /* fNoChDir */, false /* fNoClose */, fRespawn);
+        rc = VbglR3Daemonize(false /* fNoChDir */, false /* fNoClose */, fRespawn, NULL);
     if (RT_FAILURE(rc))
         VBClFatalError(("Daemonizing: %Rrc\n", rc));
