Changeset 58993 in vbox for trunk/src/VBox/Additions/x11/VBoxClient
- Timestamp:
- Dec 4, 2015 4:26:50 PM (9 years ago)
- svn:sync-xref-src-repo-rev:
- 104521
- Location:
- trunk/src/VBox/Additions/x11/VBoxClient
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/x11/VBoxClient/Makefile.kmk
r56301 r58993 67 67 seamless-x11.cpp \ 68 68 display.cpp \ 69 hostversion.cpp 69 hostversion.cpp \ 70 check3d.cpp 70 71 VBoxClient_LIBS += \ 71 72 Xext Xmu -
trunk/src/VBox/Additions/x11/VBoxClient/VBoxClient.h
r57357 r58993 78 78 extern struct VBCLSERVICE **VBClGetDragAndDropService(); 79 79 #endif /* VBOX_WITH_DRAG_AND_DROP */ 80 extern struct VBCLSERVICE **VBClCheck3DService(); 80 81 81 82 #endif /* !___vboxclient_vboxclient_h */ -
trunk/src/VBox/Additions/x11/VBoxClient/main.cpp
r57357 r58993 53 53 /** The name of our pidfile. It is global for the benefit of the cleanup 54 54 * routine. */ 55 static char g_szPidFile[RTPATH_MAX] ;55 static char g_szPidFile[RTPATH_MAX] = ""; 56 56 /** The file handle of our pidfile. It is global for the benefit of the 57 57 * cleanup routine. */ … … 165 165 "--checkhostversion|" 166 166 #endif 167 "--seamless [-d|--nodaemon]\n", pcszFileName);167 "--seamless|check3d [-d|--nodaemon]\n", pcszFileName); 168 168 RTPrintf("Starts the VirtualBox X Window System guest services.\n\n"); 169 169 RTPrintf("Options:\n"); … … 176 176 RTPrintf(" --checkhostversion starts the host version notifier service\n"); 177 177 #endif 178 RTPrintf(" --check3d tests whether 3D pass-through is enabled\n"); 178 179 RTPrintf(" --seamless starts the seamless windows service\n"); 179 180 RTPrintf(" -d, --nodaemon continues running as a system service\n"); … … 260 261 } 261 262 #endif /* VBOX_WITH_DRAG_AND_DROP */ 263 else if (!strcmp(argv[i], "--check3d")) 264 { 265 if (g_pService) 266 break; 267 g_pService = VBClCheck3DService(); 268 } 262 269 else if (!strcmp(argv[i], "-h") || !strcmp(argv[i], "--help")) 263 270 { … … 287 294 if (RT_FAILURE(rc)) 288 295 VBClFatalError(("Initialising critical section: %Rrc\n", rc)); 289 rc = RTPathUserHome(g_szPidFile, sizeof(g_szPidFile)); 290 if (RT_FAILURE(rc)) 291 VBClFatalError(("Getting home directory for pid-file: %Rrc\n", rc)); 292 rc = RTPathAppend(g_szPidFile, sizeof(g_szPidFile), 293 (*g_pService)->getPidFilePath()); 294 if (RT_FAILURE(rc)) 295 VBClFatalError(("Creating pid-file path: %Rrc\n", rc)); 296 if (fDaemonise) 297 rc = VbglR3Daemonize(false /* fNoChDir */, false /* fNoClose */, fRespawn, &cRespawn); 298 if (RT_FAILURE(rc)) 299 VBClFatalError(("Daemonizing: %Rrc\n", rc)); 300 if (g_szPidFile[0]) 301 rc = VbglR3PidFile(g_szPidFile, &g_hPidFile); 302 if (rc == VERR_FILE_LOCK_VIOLATION) /* Already running. */ 303 return 0; 304 if (RT_FAILURE(rc)) 305 VBClFatalError(("Creating pid-file: %Rrc\n", rc)); 296 if ((*g_pService)->getPidFilePath) 297 { 298 rc = RTPathUserHome(g_szPidFile, sizeof(g_szPidFile)); 299 if (RT_FAILURE(rc)) 300 VBClFatalError(("Getting home directory for pid-file: %Rrc\n", rc)); 301 rc = RTPathAppend(g_szPidFile, sizeof(g_szPidFile), 302 (*g_pService)->getPidFilePath()); 303 if (RT_FAILURE(rc)) 304 VBClFatalError(("Creating pid-file path: %Rrc\n", rc)); 305 if (fDaemonise) 306 rc = VbglR3Daemonize(false /* fNoChDir */, false /* fNoClose */, fRespawn, &cRespawn); 307 if (RT_FAILURE(rc)) 308 VBClFatalError(("Daemonizing: %Rrc\n", rc)); 309 if (g_szPidFile[0]) 310 rc = VbglR3PidFile(g_szPidFile, &g_hPidFile); 311 if (rc == VERR_FILE_LOCK_VIOLATION) /* Already running. */ 312 return 0; 313 if (RT_FAILURE(rc)) 314 VBClFatalError(("Creating pid-file: %Rrc\n", rc)); 315 } 306 316 /* Set signal handlers to clean up on exit. */ 307 317 vboxClientSetSignalHandlers();
Note:
See TracChangeset
for help on using the changeset viewer.