Changeset 67755 in vbox for trunk/src/VBox/Additions/x11
- Timestamp:
- Jul 3, 2017 1:33:55 PM (7 years ago)
- Location:
- trunk/src/VBox/Additions/x11/VBoxClient
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/x11/VBoxClient/VBoxClient.h
r67319 r67755 42 42 struct VBCLSERVICE 43 43 { 44 /** Get the services default path to pidfile, relative to $HOME . Optional*/44 /** Get the services default path to pidfile, relative to $HOME */ 45 45 /** @todo Should this also have a component relative to the X server number? 46 46 */ … … 55 55 */ 56 56 void (*cleanup)(struct VBCLSERVICE **ppInterface); 57 /** Should the service daemonise? Only checked if @a getPidFilePath is NULL. */58 /** @todo clean this up along with the pidfile handling. */59 bool fDaemonise;60 57 }; 61 58 -
trunk/src/VBox/Additions/x11/VBoxClient/display-svga.cpp
r67379 r67755 327 327 } 328 328 329 static const char *getPidFilePath() 330 { 331 return ".vboxclient-display-svga.pid"; 332 } 333 329 334 static int run(struct VBCLSERVICE **ppInterface, bool fDaemonised) 330 335 { … … 357 362 if (RT_FAILURE(rc)) 358 363 VBClFatalError(("Failed to request display change events, rc=%Rrc\n", rc)); 359 rc = VbglR3AcquireGuestCaps(VMMDEV_GUEST_SUPPORTS_GRAPHICS, 0, false); 360 if (rc == VERR_RESOURCE_BUSY) /* Someone else has already acquired it. */ 361 return VINF_SUCCESS; 364 rc = VbglR3SetGuestCaps(VMMDEV_GUEST_SUPPORTS_GRAPHICS, 0); 362 365 if (RT_FAILURE(rc)) 363 366 VBClFatalError(("Failed to register resizing support, rc=%Rrc\n", rc)); … … 414 417 struct VBCLSERVICE interface = 415 418 { 416 NULL, /* No pidfile needed, as we use acquire capability for exclusion. */419 getPidFilePath, 417 420 VBClServiceDefaultHandler, /* Init */ 418 421 run, 419 VBClServiceDefaultCleanup, 420 true /* fDaemonise */ 422 VBClServiceDefaultCleanup 421 423 }, *pInterface = &interface; 422 424 -
trunk/src/VBox/Additions/x11/VBoxClient/main.cpp
r67319 r67755 329 329 if (RT_FAILURE(rc)) 330 330 VBClFatalError(("Creating PID file path failed: %Rrc\n", rc)); 331 }332 if ((*g_pService)->getPidFilePath || (*g_pService)->fDaemonise)333 {334 331 if (fDaemonise) 335 332 rc = VbglR3Daemonize(false /* fNoChDir */, false /* fNoClose */, fRespawn, &cRespawn);
Note:
See TracChangeset
for help on using the changeset viewer.